[SERVER-37637] Standalone mode nodes should ignore in-progress index builds on startup Created: 15/Oct/18  Updated: 29/Oct/23  Resolved: 31/Jan/20

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: 4.3.4

Type: Task Priority: Major - P3
Reporter: Dianna Hohensee (Inactive) Assignee: Louis Williams
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-37726 Make dropIndexes abort in-progress in... Closed
depends on SERVER-38350 Register index builds recovered in st... Closed
depends on SERVER-38910 Remove redundant rollback handling on... Closed
Duplicate
is duplicated by SERVER-38351 Clear _unfinishedIndexes from IndexCa... Closed
Related
related to SERVER-57795 index_build_restart_standalone.js sho... Closed
related to SERVER-44468 Enable characterize_index_builds_on_r... Closed
is related to SERVER-38118 Write characterization tests for rest... Closed
is related to SERVER-38797 Add unit tests for the IndexCatalog Closed
Backwards Compatibility: Fully Compatible
Sprint: Storage NYC 2018-12-31, Storage NYC 2019-01-14, Execution Team 2020-02-10
Participants:
Linked BF Score: 16

 Description   

Standalone nodes will ignore in-progress index builds so as not to deviate from their original replica sets. On rejoining the replica set, in replset mode, the in-progress index builds will be recovered and finished according to whether the replica set committed or aborted the index builds.

This will also require correct handling of neglected index catalog entries if the createIndexes command is called while in standalone mode.

The behavior is as follows:

  • createIndex will fail with a CannotBuildIndex error, explaining that the index must be dropped first.
  • dropIndex should succeed


 Comments   
Comment by Githook User [ 31/Jan/20 ]

Author:

{'name': 'Louis Williams', 'username': 'louiswilliams', 'email': 'louis.williams@mongodb.com'}

Message: SERVER-37637 Standalone nodes should not restart in-progress two-phase index builds on startup

If a replica set node is started in standalone mode and there are
incomplete two-phase index builds, instead of restarting them, we mark
the indexes as 'frozen'. This signifies that the indexes are unusable,
and will not be rebuilt. The only option available to users is to drop
the index. This can corrupt the replica set, but modifying replicated
data in standalone mode already poses this danger.
Branch: master
https://github.com/mongodb/mongo/commit/df03d4ddc092ca3616575dd6ec08f7c4852d51e0

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