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

Fix prepare_conflict.js to use write concern "majority" when creating an index

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.2.8, 4.4.0-rc8, 4.7.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • v4.4, v4.2
    • Repl 2020-06-01
    • 13

      This index build should be run with write concern "majority" because it will set a collection's minVisibleSnapshot when committing. If the index build's commit timestamp isn't included in all_durable, then this transaction could establish a readTimestamp earlier than the collection's minVisibleSnapshot (since it is run with snapshot read concern without atClusterTime, it will choose the all_durable timestamp as its readTimestamp). This causes the transaction to fail with snapshot unavailable. In order to fix this, the index build's commit timestamp should be included in all_durable so that any oplog holes before the collection's minVisibleSnapshot are filled before starting the transction.

            Assignee:
            samy.lanka@mongodb.com Samyukta Lanka
            Reporter:
            samy.lanka@mongodb.com Samyukta Lanka
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: