[SERVER-41640] forEachCollectionFromDb() should call abandonSnapshot() before running the user provided callback Created: 11/Jun/19  Updated: 29/Oct/23  Resolved: 11/Jun/19

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: 4.2.0-rc1, 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
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.2
Sprint: Execution Team 2019-06-17
Participants:
Linked BF Score: 28

 Description   

The forEachCollectionFromDb CollectionCatalog helper should abandon its snapshot before it performs the user provided callback on each collection.
If the snapshot is not abandoned, then any newly added collections have the chance to be seen as forEachCollectionFromDb iterates over the remaining collections. This could lead to inconsistencies, such as seeing indexes in the IndexCatalog of the new collection but not seeing them on-disk due to using an older snapshot.



 Comments   
Comment by Githook User [ 11/Jun/19 ]

Author:

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

Message: SERVER-41640 forEachCollectionFromDb() should call abandonSnapshot() before running the user provided callback
Branch: v4.2
https://github.com/mongodb/mongo/commit/4f5550adaeff1c56cc0499e8b1cf1a75c953c02d

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