[SERVER-49012] Background validation needs to use ignore_prepare=false Created: 22/Jun/20  Updated: 15/Feb/21  Resolved: 25/Sep/20

Status: Closed
Project: Core Server
Component/s: Diagnostics, Storage
Affects Version/s: 4.4.0-rc10
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Eric Milkie Assignee: Eric Milkie
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
depends on WT-6503 Cache stuck: eviction couldn't able t... Closed
Duplicate
duplicates SERVER-47681 Background validation uses the kNoOve... Closed
Related
related to WT-6422 Document expectation around ignore_pr... Closed
Backport Requested:
v4.4
Sprint: Execution Team 2020-07-13, Execution Team 2020-08-10, Execution Team 2020-09-07, Execution Team 2020-09-21, Execution Team 2020-10-05
Participants:
Linked BF Score: 62

 Description   

Currently, foreground and background validation both use ignore_prepare=true. This is required for foreground validation not to deadlock on secondaries, and since it holds a strong lock there is no issue with prepared transactions concurrently committing while foreground validation is running.

For background validation, prepared transactions can commit concurrently when the validation is running. Because snapshot isolation does not apply to prepared transaction writes when a reader is using ignore_prepare=true, the validation can mistakenly report a data corruption problem between indexes and collections updated in the same prepared transaction. For this reason, we must change ignore_prepare to be false when background validation is running. This could be problematic, however, since background validation currently stops replication application while it is running, so any encounters with prepare conflicts will cause a deadlock without further code logic changes.



 Comments   
Comment by Eric Milkie [ 30/Sep/20 ]

Background validation now indeed does not ignore prepared writes; this code change was committed as part of SERVER-47681.

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