[SERVER-46930] AutoGetOplog doesn't acquire collection IX lock correctly for non-document-locking engines Created: 18/Mar/20  Updated: 29/Oct/23  Resolved: 18/Mar/20

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

Type: Bug Priority: Major - P3
Reporter: Lingzhi Deng Assignee: Lingzhi Deng
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Related
related to SERVER-45626 Consistent Oplog Locking Rules Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.4
Sprint: Repl 2020-03-23
Participants:
Linked BF Score: 50

 Description   

In kLogOp mode, AutoGetOplog only acquires collection lock for non-document-locking storage engines if it is not already held. However, AutoGetOplog uses ShouldNotConflictWithSecondaryBatchApplicationBlock which makes isCollectionLockedForMode always return true, resulting in skipping collection lock for kLogOp mode under non-document-locking storage engines.



 Comments   
Comment by Githook User [ 14/Sep/20 ]

Author:

{'name': 'Lingzhi Deng', 'email': 'lingzhi.deng@mongodb.com', 'username': 'ldennis'}

Message: SERVER-45626: Introduce AutoGetOplog for consistent oplog locking rules SERVER-46930: Fix AutoGetOplog for non-document-locking storage engines SERVER-47959 JournalFlusher will retry oplog reads on WriteConflictExceptions caused by a concurrent

{full:true}

validate command on the oplog collection

(cherry picked from commit c15e8ae74071482d69179c7e5e5e6bdc882d2beb)
(cherry picked from commit 4c4cd897f09a85441ad60058b42ea1149b65d7de)
(cherry picked from commit dcc42b3db40ecc1cb3ca278d9dcc2208a6c7734a)
Branch: v4.4
https://github.com/mongodb/mongo/commit/503dce2ce6465116cd05d04e4ea88f837e406e8d

Comment by Githook User [ 18/Mar/20 ]

Author:

{'email': 'lingzhi.deng@mongodb.com', 'name': 'Lingzhi Deng', 'username': 'ldennis'}

Message: SERVER-46930: Fix AutoGetOplog for non-document-locking storage engines
Branch: master
https://github.com/mongodb/mongo/commit/4c4cd897f09a85441ad60058b42ea1149b65d7de

Generated at Thu Feb 08 05:12:50 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.