[SERVER-16431] Get rid of the ParallelBatchWriter mutex (aka "peanut-butter" lock) Created: 05/Dec/14  Updated: 06/Dec/22  Resolved: 16/Nov/16

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

Type: Task Priority: Major - P3
Reporter: Kaloian Manassiev Assignee: Backlog - Storage Execution Team
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-16980 background ensureIndex blocks too man... Closed
Assigned Teams:
Storage Execution
Participants:

 Description   

The ParallelBatchWriter lock needs to be acquired by each thread in both standalone and replicated instances. Now that the MMAP V1 journaling is split into global and flush locks, we can get rid of the PBR lock.

The difference would be that the replication apply log coordinator will take the global lock in X mode before spawning the applier threads. Each applier thread then will not take the global lock (but will still take the flush lock in MMAP V1).



 Comments   
Comment by Eric Milkie [ 16/Nov/16 ]

The ParallelBatchWriter is no longer a mutex but is a first class lockable resource. After conferring with Geert, we agreed that this work is no longer necessary, and that some day when secondary replication logic is replaced, it will go away on its own.

Comment by Githook User [ 15/Jan/15 ]

Author:

{u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}

Message: SERVER-16431 Simplify DB profile code
Branch: master
https://github.com/mongodb/mongo/commit/02a78a7f3d936813ea9e4195887b11d83448fcd6

Comment by Githook User [ 09/Jan/15 ]

Author:

{u'username': u'jrassi', u'name': u'Jason Rassi', u'email': u'rassi@10gen.com'}

Message: SERVER-16431 Remove extraneous space from OpDebug::report() output
Branch: master
https://github.com/mongodb/mongo/commit/81109be93d335a4a8a5bca64001c56c41640ba96

Comment by Githook User [ 29/Dec/14 ]

Author:

{u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}

Message: SERVER-16431 Enable yielding for all storage engines
Branch: master
https://github.com/mongodb/mongo/commit/8f83ff2335ea0e2dd0dc2fc79b6509c4f8f2d4fc

Comment by Githook User [ 18/Dec/14 ]

Author:

{u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}

Message: SERVER-16431 Sync::shouldRetry should use DB X lock, not global
Branch: master
https://github.com/mongodb/mongo/commit/00578e45d13fe73ff51c4ff482d53ce465552752

Comment by Githook User [ 18/Dec/14 ]

Author:

{u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}

Message: SERVER-16431 Fix compile break with clang
Branch: master
https://github.com/mongodb/mongo/commit/eaad2ce5b976995b745907030410218191f82bde

Comment by Githook User [ 18/Dec/14 ]

Author:

{u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}

Message: SERVER-16431 Move the acquisition of the flush lock to a separate method

Also adds assertions and new tests. No functional changes yet - this is in
preparation for removal of the parallel batch writer lock.
Branch: master
https://github.com/mongodb/mongo/commit/cf0c561330c073bebf63f5246e815ec44f7180db

Comment by Githook User [ 17/Dec/14 ]

Author:

{u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}

Message: Revert "SERVER-16431 Simplify DB profile code"

This reverts commit c5ebc6be8e3a865655acbc5ecd1cb3b96fdf44ff.
Branch: master
https://github.com/mongodb/mongo/commit/8d90ce21ffb7fac21fd9f287ce3d66a4c6b576b8

Comment by Githook User [ 17/Dec/14 ]

Author:

{u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}

Message: SERVER-16431 Simplify DB profile code
Branch: master
https://github.com/mongodb/mongo/commit/c5ebc6be8e3a865655acbc5ecd1cb3b96fdf44ff

Comment by Githook User [ 05/Dec/14 ]

Author:

{u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}

Message: SERVER-16431 Remove recursive() and recursiveCount() from Locker

Not used anywhere.
Branch: master
https://github.com/mongodb/mongo/commit/0a3ff55d57b75f75515d44f73d2f8712e24101fc

Comment by Githook User [ 05/Dec/14 ]

Author:

{u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}

Message: SERVER-16431 Implement TempRelease in terms of save/restore lock state

Allows us to get rid of the scoped lock chaining and pass on the
recursivity tracking to Locker::saveLockState.
Branch: master
https://github.com/mongodb/mongo/commit/db123c1f4f7f971d4410f735b78d0fd332984477

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