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

Fix maxCount/maxBytes in extra index keys check to be checked during a batch

    • Type: Icon: Task Task
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Replication

      Right now in extra index keys check, maxCount/maxBytes are only checked at the end of a batch, but they should also be checked during the batch (on each doc) as well.

      We should also test the interaction between maxCount/maxBytes, consecutive identical index keys, and logging $maxKey.

      • if maxCount/maxBytes is reached, we don't log $maxKey as the final end key, since the dbcheck run completed early. Instead the last key checked is logged as the final end key.
      • If there are consecutive identical index keys and we hit the consecutive identical index key limit at the end of a batch (not the end of the entire db check run), this key is logged as the end key, and the numConsecutiveIdenticalIndexKeysChecked at the end of this batch will also need to be added to the hash by the hasher (this case should already be tested).
      • If there are consecutive identical index keys and we hit the consecutive identical index key limit at the end of an entire run (aka end of the collection), then $maxKey should still be logged as the final end key. The secondary should check both that the hash is correct and also that there are no other distinct keys after the identical index keys.
      • If there are consecutive identical index keys when maxCount is reached, then $maxKey should not be logged as the final end key and instead the last key checked is logged as the final end key, but the numConsecutiveIdenticalIndexKeysChecked at the end of this batch will also need to be added to the hash by the hasher.

            Assignee:
            Unassigned Unassigned
            Reporter:
            huayu.ouyang@mongodb.com Huayu Ouyang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: