-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: dbCheck
-
Replication
-
Fully Compatible
-
Repl 2024-08-05, Repl 2024-08-19
We need to ensure that the index keystrings (with and without recordId) are always in monotonic order. We can achieve this by comparing the next key entry with the current index entry during the extra index key check process.
Note: Additionally, because each batch starts with the nextKey of the last key from the previous batch, there's no need to check the previous key of the first key in the batch, as it has already been validated with the previous batch.
Ensuring the index is always monotonic simplifies the uniqueness check. We can verify uniqueness by ensuring that the next keystring (without recordId) is always greater than the current keystring (without recordId).