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

Index builds must ensure a storage transaction is active to correctly ignore prepare conflicts

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 4.2.0
    • Component/s: None
    • None
    • Storage Execution
    • ALL

      The collection scan stage of index builds is not guaranteed to perform reads inside of a transaction. This is not normally problematic, because WiredTiger still guarantees snapshot isolation. The flag to ignore prepare conflicts with "ignore_prepare=true" is set on the call to "begin_transaction, so If no transaction is open, prepare conflicts will not be ignored.

      The cursor used by the collection scan stage opens a transaction implicitly by a call to getSession(). The WriteUnitOfWork::commit() during index build collection scans ends the current WT transaction, and inactivates the RecoveryUnit. Any subsequent cursor operation will use a valid cursor, but not inside of a transaction, and not ignoring prepare conflicts.

            Assignee:
            backlog-server-execution [DO NOT USE] Backlog - Storage Execution Team
            Reporter:
            louis.williams@mongodb.com Louis Williams
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: