[SERVER-63615] Avoid deadlocks in wiredtiger_prepare_conflict.h Created: 14/Feb/22  Updated: 24/Feb/22  Resolved: 24/Feb/22

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

Type: Task Priority: Major - P3
Reporter: Jordi Olivares Provencio Assignee: Jordi Olivares Provencio
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-63322 Reading between commit_timestamp and ... Closed
Sprint: Execution Team 2022-02-21, Execution Team 2022-03-07
Participants:

 Description   

In preparation of WT-8747 it was discovered after applying the preliminary patch that there is potential for deadlocking the server with the following sequence of actions:

  • Transaction A commits data with commit_timestamp=20,durable_timestamp=30
  • Transaction B begins at timestamp 25 and attempts to read data, leading to a WT_PREPARED_CONFLICT as A has not yet been made durable and waiting until another transaction commits or aborts.{{}}
  • Transaction B is deadlocked if there are no more transactions happening

To avoid this a solution is to add a timeout mechanism that will retry the method even if a transaction has not yet been committed/rolled back so that it can pick up eventually when the data has been made durable.



 Comments   
Comment by Jordi Olivares Provencio [ 24/Feb/22 ]

Closing the ticket as it offers dubious value

Comment by Daniel Gottlieb (Inactive) [ 14/Feb/22 ]

I can be convinced that there's benefit to timing out prepare conflicts to see if there was a "missed notification", but I'm very hesitant to make a change based on a premise that WT needs to change the change the semantics of a prepare conflict. I.e: returning a prepare conflict when there is no active prepared transction on a WT document.

cc louis.williams

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