[DOCS-13581] Investigate changes in SERVER-44343: Make 'reIndex' a standalone-only command Created: 09/Apr/20  Updated: 13/Nov/23  Due: 08/Jan/21  Resolved: 06/Jan/21

Status: Closed
Project: Documentation
Component/s: manual, Server
Affects Version/s: None
Fix Version/s: 4.7.0, Server_Docs_20231030, Server_Docs_20231106, Server_Docs_20231105, Server_Docs_20231113

Type: Task Priority: Major - P3
Reporter: Backlog - Core Eng Program Management Team Assignee: Joseph Dougherty
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
documents SERVER-44343 Make 'reIndex' a standalone-only command Closed
Participants:
Days since reply: 3 years, 4 weeks, 6 days ago
Epic Link: DOCSP-9747

 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.)



 Comments   
Comment by Ian Whalen (Inactive) [ 07/Jan/21 ]

Author:

{'username': u'andf-mongodb', 'name': u'Joseph Dougherty', 'email': u'joseph.dougherty@mongodb.com'}

Message:DOCS-13581 reIndex may only be run on standalone v5.0
Branch:v5.0
https://github.com/mongodb/docs/commit/b8ffa74ca91eea583a319bfaa07d560f42459faa

Comment by Ian Whalen (Inactive) [ 07/Jan/21 ]

Author:

{'username': u'andf-mongodb', 'name': u'andf-mongodb', 'email': u'55111344+andf-mongodb@users.noreply.github.com'}

Message:DOCS-13581 trivial fix list entries
Branch:v5.0
https://github.com/mongodb/docs/commit/6d5df298d63d24d076361655e18bcd1e0d884b52

Comment by Githook User [ 06/Jan/21 ]

Author:

{'name': 'andf-mongodb', 'email': '55111344+andf-mongodb@users.noreply.github.com', 'username': 'andf-mongodb'}

Message: DOCS-13581 trivial remove unneeded replacement
Branch: v5.0
https://github.com/mongodb/docs/commit/a04281b2066d837af6e79d4a38b71869c03cbb1a

Generated at Thu Feb 08 08:08:11 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.