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

Remove Parallel Batch Writer Mutex

    • Storage Execution
    • Fully Compatible
    • Execution NAMR Team 2023-08-21

      Currently here is my understanding of the PBWM:

      • Primaries take it in IS for all reads and writes. This is unnecessary because it will never conflict with anything
      • Secondaries take it in X around a batch
      • Secondary oplog appliers don't take it at all
      • Snapshot secondary readers never take it
      • Secondary readers only take it in IS if there is no lastApplied to read from

      The lock is only really used to serialize the second and fifth bullets above. It should be fairly straightforward to always have a lastApplied value to read from on secondaries. This extra lock adds a lot of code complexity with very little value and is high value code cleanup.

            Assignee:
            gregory.noma@mongodb.com Gregory Noma
            Reporter:
            judah.schvimer@mongodb.com Judah Schvimer
            Votes:
            0 Vote for this issue
            Watchers:
            23 Start watching this issue

              Created:
              Updated:
              Resolved: