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

Ghost timestamps on primaries can break causality in multi-document "snapshot" reads

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 4.4.0-rc7
    • Fix Version/s: 4.4.0-rc9, 4.7.0
    • Component/s: None
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v4.4
    • Sprint:
      Execution Team 2020-06-15
    • Linked BF Score:
      11

      Description

      Due to behavior described in SERVER-48327, the WT "all_durable" snapshot can move backward from ghost timestamps on primaries. Multi-document transactions with readConcern "snapshot" use the kAllDurableSnapshot ReadSource, which reads at the WT all_durable* timestamp.

      If a ghost timestamp is used by a concurrent operation, an operation may observe all_durable moving backward after waiting for it to advance from a call to waitForAllEarlierOplogWritesToBeVisible. This means that a transaction with a readConcern "afterClusterTime: T" may read at a timestamp less than T.

      I believe we can fix this by making all readers of all_durable go through getAllDurableTimestamp, which tracks and only returns the highest seen timestamp, preventing callers from seeing all_durable move backward.

       

      *: all_durable is calculated as the minimum of (highest committed timestamp, oldest active timestamped transaction - 1)

        Attachments

          Activity

            People

            Assignee:
            louis.williams Louis Williams
            Reporter:
            louis.williams Louis Williams
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: