[SERVER-38341] Remove Parallel Batch Writer Mutex Created: 30/Nov/18  Updated: 29/Oct/23  Resolved: 07/Aug/23

Status: Closed
Project: Core Server
Component/s: Replication, Storage
Affects Version/s: None
Fix Version/s: 7.1.0-rc0

Type: Task Priority: Major - P3
Reporter: Judah Schvimer Assignee: Gregory Noma
Resolution: Fixed Votes: 0
Labels: modularization-project
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-79391 Stop taking PBWM with global lock Closed
depends on SERVER-79392 Remove ParallelBatchWriterMode class Closed
depends on SERVER-79398 Remove PBWM support from sleep command Closed
depends on SERVER-79399 Remove ShouldNotConflictWithSecondary... Closed
depends on SERVER-47866 Secondary readers do not need to reac... Closed
depends on SERVER-50970 Support secondary reads in ephemeralF... Closed
is depended on by SERVER-41010 getMinValid() in bgsync shouldn't con... Backlog
is depended on by SERVER-79804 Clean up references to PBWM in our ar... Closed
Related
related to SERVER-44821 retrieving storage stats for currentO... Closed
related to SERVER-44859 plan_cache_index_create.js is blocked... Closed
related to SERVER-44943 avoid taking the PBWM lock in Replica... Closed
related to SERVER-44944 avoid taking the PBWM lock in Session... Closed
related to SERVER-45007 PBWM acquisition in GlobalLock constr... Closed
related to SERVER-41407 Create a test suite that does seconda... Backlog
is related to SERVER-44105 Perform ShardServerCatalogLoader writ... Closed
is related to SERVER-48518 Rollback via refetch (EMRC = false) c... Closed
is related to SERVER-78599 Prevent change collections from trunc... Closed
is related to SERVER-48398 Writing config document to "local.sys... Backlog
is related to SERVER-26006 Audit all background tasks and decide... Closed
is related to SERVER-48399 Writing config document to "local.sys... Closed
Assigned Teams:
Storage Execution
Backwards Compatibility: Fully Compatible
Sprint: Execution NAMR Team 2023-08-21
Participants:

 Description   

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.



 Comments   
Comment by Githook User [ 07/Aug/23 ]

Author:

{'name': 'Gregory Noma', 'email': 'gregory.noma@gmail.com', 'username': 'gregorynoma'}

Message: SERVER-38341 Remove parallel batch writer mode
Branch: master
https://github.com/mongodb/mongo/commit/1d6783986496ad5cddacd69c678e760e8ce052eb

Comment by Louis Williams [ 29/Sep/20 ]

We may want to do this in a way that does not block on SERVER-44105. We can just remove usages of the PBWM everywhere except the ShardServerCatalogLoader and the batch applier. No other operations will take the PBWM otherwise.

Comment by Vesselina Ratcheva (Inactive) [ 01/Mar/19 ]

This might be a good occasion to also reevaluate the usefulness of ResourceLock, as it seems the PBWM is the primary user of that.

Generated at Thu Feb 08 04:48:41 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.