[SERVER-42503] compactCollection() should refetch the RecordStore after re-locking the collection Created: 30/Jul/19  Updated: 29/Oct/23  Resolved: 30/Jul/19

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: 4.3 Required
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:
Depends
Duplicate
is duplicated by SERVER-42596 Fix race condition in collection_comp... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Execution Team 2019-08-12
Participants:
Linked BF Score: 60

 Description   

If the storage engine supports compacting in place, we re-lock the collection we're going to compact using a weaker lock. In this case, we should re-fetch the RecordStore and IndexCatalog after acquiring the new long to avoid accessing invalid memory.



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

Author:

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

Message: SERVER-42503 compactCollection() should refetch the RecordStore after re-locking the collection
Branch: master
https://github.com/mongodb/mongo/commit/7b2efc662712bc6034da89f68b77d0140fbf82cf

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