Fix Version/s: None
Bug Category:Correctness - Recoverable Corruption / Loss
Discovered By:User Report
Cassandra version: 2.2.15
I have been running into a case where, when fetching the results from a table with a frozen<map<text, text>>, if the number of results is greater than the fetch size (default 5000), we can end up with missing data.
Side note: The table schema comes from using KairosDB, but we've isolated this issue to Cassandra itself. But it looks like this can cause problems for users of KairosDB as well.
Repro case. Tested against fresh install of Cassandra 2.2.15.
1. Create table (csqlsh)
2. Insert data (python3)
4. Fetch data (python3)
Result: 10111 (expected 20000)
Changing the page size changes the result count. Some quick samples:
In short, I cannot guarantee I'll get all the results back unless the page size > number of rows.
This seems to get worse with multiple SSTables (eg nodetool flush between some of the insert batches). When using replication, the issue can get disgustingly bad - potentially giving a different result on each query.
Interesting, if we pad the values on the tag map ("id" in this repro case) so that the insertion is in lexicographical order, there is no issue. I believe the issue also does not repro if I do not call "nodetools flush" before querying.