Details
-
Bug
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
Correctness - Transient Incorrect Response
-
Normal
Description
When replica return 2ndary index results, it's possible for a single replica to return a stale result and that result will be sent back to the user, potentially failing the CL contract.
For instance, consider 3 replicas A, B and C, and the following situation:
CREATE TABLE test (k int PRIMARY KEY, v text); CREATE INDEX ON test(v); INSERT INTO test(k, v) VALUES (0, 'foo');
with every replica up to date. Now, suppose that the following queries are done at QUORUM:
UPDATE test SET v = 'bar' WHERE k = 0; SELECT * FROM test WHERE v = 'foo';
then, if A and B acknowledge the insert but C respond to the read before having applied the insert, then the now stale result will be returned (since C will return it and A or B will return nothing).
A potential solution would be that when we read a tombstone in the index (and provided we make the index inherit the gcGrace of it's parent CF), instead of skipping that tombstone, we'd insert in the result a corresponding range tombstone.
Attachments
Issue Links
- causes
-
CASSANDRA-16311 Extend the exclusion of replica filtering protection to other indices instead of just SASI
- Resolved
- is depended upon by
-
CASSANDRA-13423 Secondary indexes can return stale data for deleted rows in 2.x
- Open
- is duplicated by
-
CASSANDRA-8273 Allow filtering queries can return stale data
- Resolved
- is related to
-
CASSANDRA-8273 Allow filtering queries can return stale data
- Resolved
- relates to
-
CASSANDRA-19007 Queries with multi-column replica-side filtering can miss rows
- Open
-
CASSANDRA-19018 An SAI-specific mechanism to ensure consistency isn't violated for multi-column (i.e. AND) queries at CL > ONE
- Resolved
-
CASSANDRA-15907 Operational Improvements & Hardening for Replica Filtering Protection
- Resolved
-
CASSANDRA-15910 Add multi-partition key commands
- Triage Needed
- links to