Details
-
Improvement
-
Resolution: Done
-
Major
-
7.2.0
-
0
-
KV 2023-2
Description
Magma has an optimisation for the initial snapshot that means it can skip lookups for each key - this needs disabling if the initial snapshot is historical
We should be able to wire the new snapshot flags through to the flusher and ensure that we don't enter the following code block for an intial history snapshot.
// A disk snapshot has unique items and if we're receiving a vbucket from
|
// the start (seqno 0), we can issue Insert operations. This benefits some
|
// KVStore implementations since a lookup isn't needed. This scenario
|
// commonly occurs in rebalance where a vbucket is taken over by a new node.
|
if (toFlush.ranges.size() == 1 &&
|
toFlush.checkpointType == CheckpointType::InitialDisk) {
|
writeOp = WriteOperation::Insert;
|
}
|