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.
- is related to
-
SERVER-48019 Investigate whether queries can continue after a yield when the catalog has been closed and reopened
- Closed
- related to
-
SERVER-47803 Move the database level profile setting from Database into CollectionCatalog
- Closed