[SERVER-50145] Have DDL operations and MODE_X writers install a new Collection object Created: 06/Aug/20  Updated: 29/Oct/23  Resolved: 09/Oct/20

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

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

Issue Links:
Depends
depends on SERVER-50273 Extend Decorable system to support co... Closed
depends on SERVER-50317 Make uses of Collection const-correct Closed
depends on SERVER-50984 Make query yielding aware of AutoGetC... Closed
Related
related to SERVER-51236 Merge UncommittedCollections with Unc... Closed
related to SERVER-49881 remove noop std::move from Collection... Closed
is related to SERVER-47333 Investigate and enforce stronger snap... Closed
Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2020-08-24, Execution Team 2020-09-07, Execution Team 2020-09-21, Execution Team 2020-10-05, Execution Team 2020-10-19
Participants:

 Description   

With Lock Free Reads, Collection objects may be read without holding locks, so writers must create a copy of the Collection object for modifications, and register that with the Collection catalog to prevent concurrent reads and writes.



 Comments   
Comment by Githook User [ 08/Oct/20 ]

Author:

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

Message: SERVER-50145 Collection instances are modified using copy-on-write

When a writable collection is requested from the catalog a cloned instance will be returned.
Its lifetime is managed by default in a WriteUnitOfWork and committed into the catalog in a commit handler.
In the case of a rollback the cloned and modified collection instance is simply discarded.

This removes the need to setup rollback handlers to restore any state written to a collection in the case of a rollback.
Branch: master
https://github.com/mongodb/mongo/commit/9be7d417381013546abb1cb8fd3886d572bf9b22

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