ZhaoYang created CASSANDRA-15761: ------------------------------------ Summary: Make SASI query safe for concurrent compaction Key: CASSANDRA-15761 URL: https://issues.apache.org/jira/browse/CASSANDRA-15761 Project: Cassandra Issue Type: Bug Components: Feature/2i Index Reporter: ZhaoYang
Read Request Thread: 1.) In {{QueryController#getIndexes}}, read request gets the current {{view}} of sstable indexes. 2.) Request will try to reference the {{SSTableIndex}} from the {{view}} in {{TermIterator#build}} and skips the {{SSTableIndex}} if it cannot be referenced. Compaction Thread: If a compaction finishes between 1) and 2) and no other in-flight queries are holding the sstable index reference, compacted {{SSTableIndex}} will be released. Then in step 2, read request will not be able to reference the released {{SSTableIndex}}. We won't see a corruption error, but we'll silently not read all data. ---- Proposed fix: Read Request should make sure all {{SSTableIndexes}} from the {{View}} can be referenced; if not, it should retry with latest {{View}}. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org