[SERVER-56733] Index builds must set the PrepareConflictBehavior::kIgnoreConflictsAllowWrites flag on the RecoveryUnit on resume in the drain phase Created: 06/May/21  Updated: 29/Oct/23  Resolved: 12/May/21

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: 5.0.0-rc0

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

Issue Links:
Depends
Duplicate
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Execution Team 2021-05-17
Participants:
Linked BF Score: 150

 Description   

A resumed index build goes through this if-else-if statement in the index build code wherein mutual setup code sets the PrepareConflictBehavior::kIgnoreConflictsAllowWrites flag on the RecoveryUnit. Setting that flag avoids a possible invariant check that the index build thread is killable (to avoid prepare conflict deadlocks).

The drain phase does not execute the if-else-if code, it is the undefined else situation. For that else situation (drain phase) we still need to set the PrepareConflictBehavior::kIgnoreConflictsAllowWrites flag on the RecoveryUnit. I recommend pulling the mutual code up, so it's more clear that the flag is set and more difficult to accidentally forget.



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

Author:

{'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek'}

Message: SERVER-56733 Index builds must set the PrepareConflictBehavior::kIgnoreConflictsAllowWrites flag on the RecoveryUnit on resume in the drain phase
Branch: master
https://github.com/mongodb/mongo/commit/100811c3e5cc533c922e23ede0e5935eabc5da0c

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