This patch enables mutation tracking for queries using secondary indexes (both
legacy 2i and SAI). Key changes include the addition of the MultiStepSearcher
interface, which allows existing index implementations to iterate over matches
and filter augmented data, proper Memtable snapshotting, and the integration of
these in PartialTrackedIndexRead.
patch by Blake Eggleston; reviewed by Aleksey Yeschenko and Caleb Rackliffe for CASSANDRA-20374
Co-authored-by: Blake Eggleston <blake@ultrablake.com>
Co-authored-by: Caleb Rackliffe <calebrackliffe@gmail.com>
Co-authored-by: Aleksey Yeschenko <aleksey@apache.org>
* Tracking of Memtable -> SSTable flushes in Mutation Journal segments
* Replay of Mutation Journal segments that were not fully flushed to SSTables
* Distinguish between CommitLog and MutationJournal offsets
* Effectively adds support for node bounces
Patch by Alex Petrov; reviewed by Aleksey Yeschenko for CASSANDRA-20919
Found via MultiNodeTableWalkWithMutationTrackingTest after ~hundreds of
seeds.
java.lang.IllegalArgumentException: Cannot compact repaired and unrepaired sstables
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:143)
at org.apache.cassandra.db.compaction.AbstractCompactionTask.validateSSTables(AbstractCompactionTask.java:84)
at org.apache.cassandra.db.compaction.AbstractCompactionTask.<init>(AbstractCompactionTask.java:60)
at org.apache.cassandra.db.compaction.CompactionTask.<init>(CompactionTask.java:79)
at org.apache.cassandra.db.compaction.CompactionTask.<init>(CompactionTask.java:74)
at org.apache.cassandra.db.compaction.LeveledCompactionTask.<init>(LeveledCompactionTask.java:39)
at org.apache.cassandra.db.compaction.LeveledCompactionStrategy.getMaximalTasks(LeveledCompactionStrategy.java:192)
at org.apache.cassandra.db.compaction.CompactionStrategyHolder.getMaximalTasks(CompactionStrategyHolder.java:121)
patch by Abe Ratnofsky; reviewed by Caleb Rackliffe for CASSANDRA-20830
- filter augmenting mutations and add comment explaining why we don't exclude reconciled mutations when augmenting
- propagate exceptions during acknowledgeReconcile
- fix UnreconciledMutations handling of single key bounds
- fix single offset remove bug
patch by Blake Eggleston; reviewed by Caleb Rackliffe for CASSANDRA-20830
The map lookup (with an implicit auto-boxing) can be replaced with a plain arithmetic operation.
A unit test is used to ensure that the assumption about serialization version incrementing for new versions is still correct.
greaterThanOrEqual method is removed as unused.
Patch by Dmitry Konstantinov; reviewed by Stefan Miklosovic for CASSANDRA-20816
A flushing range is a combination of partial and full shards, for full shards we use write time captured values for count and total size of partition keys, for partial shards we iterate over keys
When we iterate over partial shards we count key bytes only instead of reading them and also try to skip tokens full parsing
Patch by Dmitry Konstantinov; reviewed by Branimir Lambov for CASSANDRA-20760
patch by Maulin Vasavada; reviewed by Andrew Tolbert, Stefan Miklosovic for CASSANDRA-20779
Co-authored-by: Andrew Tolbert <6889771+tolbertam@users.noreply.github.com>