[SERVER-47872] Move the Database class' epoch into the CollectionCatalog Created: 01/May/20  Updated: 29/Oct/23  Resolved: 12/May/20

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

Type: Task Priority: Major - P3
Reporter: Dianna Hohensee (Inactive) Assignee: Dianna Hohensee (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-47803 Move the database level profile setti... Closed
is related to SERVER-48019 Investigate whether queries can conti... Closed
Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2020-05-18
Participants:

 Description   

The Database _epoch field is initialized on instantiation of a DatabaseImpl. It is never reset, so it can only change by dropping and recreating the database. The only user is RequiresCollectionStage, which checks that the db epoch has not changed on restore after a query yield.

RequiresCollectionStage also tracks collection UUID to check on restore. Therefore, checking the db epoch is superfluous. If the database is dropped and recreated, then the collection is dropped and recreated, which means the UUID changes.

However, the database epoch also changes when the catalog is closed and reopened, recreating the Database objects. Therefore, we can safely move tracking to the CollectionCatalog class.



 Comments   
Comment by Githook User [ 12/May/20 ]

Author:

{'name': 'Dianna Hohensee', 'email': 'dianna.hohensee@mongodb.com', 'username': 'DiannaHohensee'}

Message: SERVER-47872 Move the Database class' epoch into the CollectionCatalog
Branch: master
https://github.com/mongodb/mongo/commit/3de4762514cee3507f77efd7b46b20c4362c041a

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