Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-13581

Investigate changes in SERVER-44343: Make 'reIndex' a standalone-only command

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Resolved
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.7.0
    • Component/s: manual, Server
    • Labels:
      None
    • Last comment by Customer:
      false
    • Sprint:
      ServerDocs2020: Nov17 - Nov 24, ServerDocs2020: Nov24 - Dec1, ServerDocs2020: Dec1 - Dec8, ServerDocs2020: Dec8 - Dec15, ServerDocs2020: Dec15 - Jan 5, ServerDocs2020: Jan5 - Jan12

      Description

      Description

      Downstream Change Summary

      The reIndex command can now only be run on a standalone mongod.

      Description of Linked Ticket

      Trying to run the 'reIndex' command on a secondary while having unfinished prepared transactions will hit an invariant. After dropping the index that will be re-indexed, we hit an invariant when doing a collection scan to insert all the documents in the collection for that index.

      Invariant failure lock.mode != MODE_S && lock.mode != MODE_X {6917529027641081857: Global, 1} in X src/mongo/db/storage/wiredtiger/wiredtiger_prepare_conflict.h 111
      

      [~ldeng] recommended to try set the 'canIgnorePrepareConflicts' flag to true for the 'reIndex' command but that ended up hitting another invariant while trying to drop all the indexes.

      WiredTiger error (95) [1572545292:296845][8488:0x7f381342b700], file:_mdb_catalog.wt, WT_CURSOR.insert: __wt_txn_modify, 463: Transactions with ignore_prepare=true cannot perform updates: Operation not supported Raw: [1572545292:296845][8488:0x7f381342b700], file:_mdb_catalog.wt, WT_CURSOR.insert: __wt_txn_modify, 463: Transactions with ignore_prepare=true cannot perform updates: Operation not supported
       
      Invariant failure: ret resulted in status UnknownError: 95: Operation not supported at src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp 1442
      

      We should consider disallowing the 'reIndex' command from running on secondaries and removing it in a future release.

      Scope of changes

      Please review and update:

      • reIndex command page (and any appropriate method pages if applicable)
      • 5.0 compatibility notes

      Impact to Other Docs

      MVP (Work and Date)

      Resources (Scope or Design Docs, Invision, etc.)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              joseph.dougherty Joseph Dougherty
              Reporter:
              backlog-server-pm Backlog - Core Eng Program Management Team
              Participants:
              Last commenter:
              Ian Whalen Ian Whalen
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Due:
                Created:
                Updated:
                Resolved:
                Days since reply:
                13 weeks, 2 days ago
                Date of 1st Reply: