Please sign in to comment.
Adapt to Cassandra version to avoid CASSANDRA-8733
This Cassandra bug causes list updates to reverse the order of the array sent, which was being worked around in List#unshift by reversing the array that was sent. This change detects the version of Cassandra and only reverses when it's a known buggy version. Also, the tests detect the version and expect a list_prepend operation to produce reversed lists in buggy versions. See: https://issues.apache.org/jira/browse/CASSANDRA-8733 The bug was fixed in 2.1.3 and 2.0.13. This code depends on the .cassandra-versions file to compile a list of buggy versions, but doesn't add any other dependencies. The following three tests now pass: Cequel::Record::List#unshift should persist unloaded unshift Cequel::Record::List#unshift should atomically unshift Cequel::Metal::DataSet#list_prepend should prepend multiple elements to list column Tested on the following versions of Cassandra: 2.0.4 2.0.12 2.0.13 2.0.16 2.1.2 2.1.3 2.1.8 2.2.1
- Loading branch information...
Showing with 39 additions and 5 deletions.