DSP-1371: Backport CASSANDRA-5231