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

Violation of transaction snapshot isolation when collection concurrently dropped

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 4.4.0, 5.0.0, 6.0.0
    • Component/s: None
    • None
    • Replication
    • ALL
    • v5.0, v4.4
    • Repl 2024-01-22, Repl 2024-02-05, Repl 2024-02-19

      On versions earlier than v7.0, there's the following anomaly on transactions with snapshot read concern. Consider the following scenario:
      1. Insert two docs to coll1
      2. Insert one doc to coll2
      3. Start transaction with snapshot read concern and read from coll1. Expect to see 2 docs.
      4. Outside the transaction, insert a third doc to coll1.
      5. Outside the transaction, drop coll2.
      6. Within the transaction, read coll2. Expect to see 1 doc. But it sees 0 (as if coll2 does not exist)

      This is a violation of snapshot isolation because there never existed a snapshot where coll1 had 2 documents but coll2 didn't exist.

      The same can happen exchanging 'drop' by 'rename'.

      This does not reproduce on v7.0 and later thanks to PM-2218.

            Assignee:
            matthew.russotto@mongodb.com Matthew Russotto
            Reporter:
            jordi.serra-torrens@mongodb.com Jordi Serra Torrens
            Votes:
            0 Vote for this issue
            Watchers:
            26 Start watching this issue

              Created:
              Updated:
              Resolved: