[SERVER-38712] Do not hold a collection lock while failing a background index build on secondaries Created: 19/Dec/18  Updated: 29/Oct/23  Resolved: 28/Dec/18

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

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

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Storage NYC 2018-12-31
Participants:
Linked BF Score: 31

 Description   

If a background index build fails on a secondary during a collection scan, we hold a collection lock while trying to re-lock a database X lock.

This is problematic on non-document-locking storage engines, which can introduce a deadlock when multiple index builds are all canceled at the same time (like shutdown).



 Comments   
Comment by Githook User [ 28/Dec/18 ]

Author:

{'username': 'milkie', 'email': 'milkie@10gen.com', 'name': 'Eric Milkie'}

Message: SERVER-38712 do not hold collection lock while failing a bg index build on secondaries
Branch: master
https://github.com/mongodb/mongo/commit/4544eab4b30791fa1c0bf9d60fdbc1bd2263987a

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