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

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

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 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

      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@mongodb.com Sean Zimmerman
            Reporter:
            kaitlin.mahar@mongodb.com Kaitlin Mahar
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: