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

Background collection validation can read behind the minimum visible snapshot

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Works as Designed
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Storage
    • None
    • ALL
    • Execution Team 2020-05-04
    • 19

    Description

      I added an invariant to check if the all durable read timestamp we were given was a valid read timestamp for the collection (given its minimum visible snapshot). This doesn't turn out to always be true.

      Because we opted to use CollectionLock in validation, as opposed to AutoGetCollection, we miss out on its internal checks for this.

      [conn196] Timestamps{"getPointInTimeReadTimestamp":{"$timestamp":{"t":20,"i":22058}},"getMinimumVisibleSnapshot":{"$timestamp":{"t":1587410841,"i":5}}}
      [conn196] Replication state{"mode":"PRIMARY"}
      [conn196] Invariant failure{"expr":"*opCtx->recoveryUnit()->getPointInTimeReadTimestamp() >= validateState.getCollection()->getMinimumVisibleSnapshot()","file":"src/mongo/db/catalog/collection_validation.cpp","line":507}
      

      We should probably loop trying to get a valid read timestamp for the collection and all of its indexes that will be validated.

      Attachments

        Activity

          People

            gregory.wlodarek@mongodb.com Gregory Wlodarek
            gregory.wlodarek@mongodb.com Gregory Wlodarek
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: