Background collection validation can read behind the minimum visible snapshot

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Works as Designed
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Storage
    • None
    • ALL
    • Execution Team 2020-05-04
    • 19
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            Gregory Wlodarek
            Reporter:
            Gregory Wlodarek
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: