[SERVER-43707] CollectionLock destroyed immediately after creation in DatabaseImpl::dropCollectionEvenIfSystem() Created: 30/Sep/19  Updated: 29/Oct/23  Resolved: 01/Oct/19

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

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

Issue Links:
Backports
Depends
is depended on by SERVER-43734 clang-tidy error in database_impl.cpp Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.2
Sprint: Execution Team 2019-10-07
Participants:

 Description   

The collection lock here gets destroyed immediately because it wasn't assigned a name.



 Comments   
Comment by Githook User [ 30/Sep/19 ]

Author:

{'username': 'GWlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'name': 'Gregory Wlodarek'}

Message: SERVER-43707 CollectionLock destroyed immediately after creation in DatabaseImpl::dropCollectionEvenIfSystem()
Branch: master
https://github.com/mongodb/mongo/commit/25b63d9ff12ebdfde549288ebaa7ff27c6945dd7

Comment by Geert Bosch [ 30/Sep/19 ]

Note that this doesn't actually release the lock in this case, as the WriteUnitOfWork delays the unlock as part of the 2 phase locking protocol. Still, it's good to fix this, as it's easy for code to get reused in a different context where this will be a hard-to-find concurrency bug.

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