[SERVER-56314] Internal system threads with kIgnoreConflictsAllWrites set and running wiredTigerPrepareConflictRetry code should not be required to be killable for stepdown Created: 23/Apr/21  Updated: 30/Apr/21  Resolved: 30/Apr/21

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

Type: Bug Priority: Major - P3
Reporter: Dianna Hohensee (Inactive) Assignee: Dianna Hohensee (Inactive)
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Operating System: ALL
Backport Requested:
v4.4
Sprint: Execution Team 2021-05-03
Participants:
Linked BF Score: 115

 Description   

We set index builds to ignore prepare conflicts using the kIgnoreConflictsAllowWrites setting, which appears to only be used to set a flag on a WT request, but then we also enforce that internal threads can be killed for step-down in order to avoid hangs with said threads hitting prepare conflicts, without any apparent exception for threads that have kIgnoreConflictsAllowWrites set.

I believe there should be an exception to the client->canKillSystemOperationInStepdown() invariant where internal threads with kIgnoreConflictsAllowWrites set should not be required to be killable.



 Comments   
Comment by Dianna Hohensee (Inactive) [ 30/Apr/21 ]

Louis noticed in the CR that the code doesn't behave how we originally thought it. See below. Closing this and reopening the BF for investigation.

> > The prepareConflictRetry helper takes some WT API call, "f", and calls it on
> > line 71. If it returns a WT_PREPARE_CONFLICT, we will reach this line of code.
> > But on line 72, we return if the code is not a prepare conflict. The
> > "PrepareConflictBehavior" is supposed to prevent WT from returning this code at
> > all. So it seems like maybe there is a different problem. Either WT is returning
> > this error code despite us asking to ignore prepare conflicts, or our code isn't
> > properly setting this flag and passing it to the WT API.

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