backport CASSANDRA-6079