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

dbHash tries to read every collection at a timestamp while iterating through the present CollectionCatalog

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Catalog and Routing
    • ALL
    • 129
    • 2

      dbHash obtains the collection catalog through this helper that gives dbHash a handle of the catalog as it looks like in the present.

      However, when dbHash is running with a snapshot readConcern at a time in the past (via readConcern: {level: 'snapshot', atClusterTime: Timestamp(...)} or through $_internalReadAtClusterTime: Timestamp(...)), it's possible for the present collection catalog to NOT contain an entry for a collection even though the collection existed at the given prior point-in-time.

      Since dbHash iterates through the collections in the catalog and then establishes the collection at the given point-in-time for each collection in the catalog, it becomes possible for it to miss certain collections:

      // The loop goes through the catalog as it looks like in the present
      for (auto coll&& catalog->range(dbName)) {
           // Therefore every 'coll' that we see will only include collections that exist
           // now and will not include collections that have already been dropped.

      I assigned this to Replication because since Replication is working on dbCheck I assumed it owns both dbCheck and dbHash. But feel free to reassign to a more appropriate team.

            Unassigned Unassigned
            vishnu.kaushik@mongodb.com Vishnu Kaushik
            0 Vote for this issue
            8 Start watching this issue