[SERVER-43727] Yield locks on secondaries while waiting for two-phase index builds to commit or abort Created: 30/Sep/19  Updated: 29/Oct/23  Resolved: 01/Oct/19

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

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

Issue Links:
Depends
Duplicate
is duplicated by SERVER-43709 Enable backup_restore.js when two pha... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Execution Team 2019-10-07
Participants:
Linked BF Score: 17

 Description   

Because we upgrade all IX locks to X locks on the "admin" database, two-phase index builds on secondaries that are waiting to commit or abort, will deadlock waiting for a replicated "commitIndexBuild" or "abortIndexBuild" oplog entry. These replicated commands take a database IS lock before they are applied, and will be unable to complete, preventing the index build from completing, but also stalling replication.

The simplest solution should be to yield locks before calling "waitForConditionOrInterrupt".



 Comments   
Comment by Githook User [ 01/Oct/19 ]

Author:

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

Message: SERVER-43727 Yield locks on secondaries while waiting for two-phase index builds to commit or abort
Branch: master
https://github.com/mongodb/mongo/commit/98939f35ef1f58566b20ac5e78debb42a56b0366

Comment by Louis Williams [ 30/Sep/19 ]

This ticket should also enable backup_restore*.js tests.

Comment by Louis Williams [ 30/Sep/19 ]

This bug causes the auth_reject_mismatching_logical_times.js and comment_field_passthrough.js tests to fail on the two-phase index build variant. This ticket should remove the "two_phase_index_builds_unsupported" tag for each.

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