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

Move the Database class' epoch into the CollectionCatalog

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.7.0
    • Component/s: Storage
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Sprint:
      Execution Team 2020-05-18

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dianna.hohensee Dianna Hohensee
              Reporter:
              dianna.hohensee Dianna Hohensee
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: