[SERVER-47605] Single-phase index builds should only check constraint violations upon completion Created: 16/Apr/20  Updated: 29/Oct/23  Resolved: 23/Apr/20

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.4.0-rc3, 4.7.0

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:
Backports
Depends
depends on SERVER-46989 Index builds should hold RSTL to prev... Closed
depends on SERVER-47692 SharedBufferFragmentAllocator should ... Closed
Related
related to SERVER-69677 Add warning to index build unexpected... Closed
related to SERVER-48160 remove IndexBuildsCoordinator::_tryAb... Closed
is related to SERVER-45351 Newly-elected primaries can commit in... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.4
Sprint: Execution Team 2020-05-04
Participants:
Linked BF Score: 21

 Description   

Single-phase index builds can encounter a deadlock, or worse crash, if an index build fails concurrently with an abort operation (dropIndexes, dropCollection, etc).

The deadlock is as follows:

We should do as two-phase builds do, and only check key constraints upon completion (SERVER-45852). This allows us to abort without releasing locks. This is only possible, however, after SERVER-46989 is complete.



 Comments   
Comment by Githook User [ 24/Apr/20 ]

Author:

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

Message: SERVER-47605 Single-phase index builds should only check constraint violations upon completion

(cherry picked from commit 66783cb504c25061b00c03fe55b70e3ca4125ed5)
Branch: v4.4
https://github.com/mongodb/mongo/commit/b89e5a3da73fa8ade2fba3331b833f28fbfde003

Comment by Githook User [ 23/Apr/20 ]

Author:

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

Message: SERVER-47605 Single-phase index builds should only check constraint violations upon completion
Branch: master
https://github.com/mongodb/mongo/commit/66783cb504c25061b00c03fe55b70e3ca4125ed5

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