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.

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