Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-47872

Move the Database class' epoch into the CollectionCatalog

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.7.0
    • Affects Version/s: None
    • Component/s: Storage
    • None
    • Fully Compatible
    • Execution Team 2020-05-18

      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.

            Assignee:
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Reporter:
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: