[SERVER-77025] Command application conflicting with index build should wait for its completion (partial revert of SERVER-61481) Created: 11/May/23  Updated: 29/Oct/23  Resolved: 12/May/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.1.0-rc0, 7.0.0-rc1

Type: Bug Priority: Major - P3
Reporter: Josef Ahmad Assignee: Josef Ahmad
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Problem/Incident
is caused by SERVER-61481 Remove check in dropIndexes command t... Closed
Related
related to SERVER-74953 Explore avoiding stepdowns during the... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v7.0
Sprint: Execution Team 2023-05-15
Participants:
Linked BF Score: 7

 Description   

SERVER-74953 describes a situation where a stepdown occurs while an index build is in its early setup phase, immediately followed by a DDL operation that conflicts with the index build, like dropCollection. The now-secondary mongod attempts to replicate the dropCollection. Before SERVER-61481, replication would have detected the conflict and would have waited until no index build was in progress before retrying the operation. SERVER-61481 removed that logic, and since then this results in an invariant failure.

Note that this issue is very infrequent and results in one (and just one) secondary crash. Upon restart, the secondary is able to resume replication.

This ticket is to reintroduce part of the logic that was removed in SERVER-61481.



 Comments   
Comment by Githook User [ 12/May/23 ]

Author:

{'name': 'Josef Ahmad', 'email': 'josef.ahmad@mongodb.com', 'username': 'josefahmad'}

Message: SERVER-77025 Wait for index builds to complete on conflicting command application

(cherry picked from commit be1c14d1f945a1ca55d7311c54bccae8d27edd84)
Branch: v7.0
https://github.com/mongodb/mongo/commit/a284c651582966cecbe2d1026831024c80a77569

Comment by Githook User [ 12/May/23 ]

Author:

{'name': 'Josef Ahmad', 'email': 'josef.ahmad@mongodb.com', 'username': 'josefahmad'}

Message: SERVER-77025 Wait for index builds to complete on conflicting command application
Branch: master
https://github.com/mongodb/mongo/commit/be1c14d1f945a1ca55d7311c54bccae8d27edd84

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