[SERVER-52557] Add mechanism to set minimal visible snapshot that is safe for lock free reads Created: 02/Nov/20  Updated: 29/Oct/23  Resolved: 21/Nov/20

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

Type: Task Priority: Major - P3
Reporter: Henrik Edin Assignee: Henrik Edin
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2020-11-30
Participants:

 Description   

We should implement this as a way to install a special commit handler.

Before SERVER-52556 it needs to run either before the commit handler that commits the uncommitted Collection to the catalog or under the same collection catalog mutex lock that we hold while doing that move.

After SERVER-52556 it needs to run before the compare-and-swap loop that installs a new collection catalog instance.

This commit handler may not modify the collection catalog and should just modify the collection instance itself.



 Comments   
Comment by Githook User [ 21/Nov/20 ]

Author:

{'name': 'Henrik Edin', 'email': 'henrik.edin@mongodb.com', 'username': 'henrikedin'}

Message: SERVER-52557 Publishing a writable Collection to the catalog is done with a special commit handler that runs after all regular commit handlers.

It is now safe to write to a writable Collection in a commit handler but not in a rollback handler.
We should not need to be able to write to a writable Collection that rolls back as the cloned instance will just be discarded.
Branch: master
https://github.com/mongodb/mongo/commit/0eb237e7f452e1d5239f7e9b7520f37c8730d0d3

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