Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-90772

Verify index order and uniqueness in extra keys check in 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).

            Assignee:
            jiawei.yang@mongodb.com Jiawei Yang
            Reporter:
            xuerui.fa@mongodb.com Xuerui Fa
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: