Chunk migration can incorrectly skip oplog entries written from a mixed-namespace bulkWrite command

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 7.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Replication
    • Fully Compatible
    • ALL
    • Repl 2023-10-16, Repl 2023-10-30, Repl 2023-11-13, Repl 2023-11-27, Repl 2023-12-11, Repl 2023-12-25, Repl 2024-01-08, Repl 2024-01-22
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      Currently there is an optimization in the chunk migration code where if the source sees that an oplog entry for a session has a different namespace than the one being migrated, it skips inspecting the rest of the oplog chain, with the assumption that all entries in the chain will be for a single namespace.

      Unfortunately that assumption no longer holds up for bulkWrite since a single retryable write can now touch multiple namespaces. And so if for example we have an oplog chain (from newest to oldest) generated from a single retryable bulkWrite with:

      1. write to coll1
      2. write to coll2

      And we are migrating coll2, we would see that the first entry is on a different ns and skip the rest of the chain.

            Assignee:
            Sean Zimmerman
            Reporter:
            Kaitlin Mahar
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: