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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.2.8, 4.4.0-rc8, 4.7.0
    • Component/s: None
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v4.4, v4.2
    • Sprint:
      Repl 2020-06-01
    • Linked BF Score:
      13

      Description

      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.

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: