[SERVER-64515] Remove claims of prepare behavior from linearizable reads Created: 15/Mar/22  Updated: 22/Jun/23

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

Type: Improvement Priority: Major - P3
Reporter: Daniel Gottlieb (Inactive) Assignee: Backlog - Replication Team
Resolution: Unresolved Votes: 0
Labels: repl-shortlist
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-78365 Investigate removing ignore_prepare=f... Open
is related to SERVER-37364 Coordinator should return the decisio... Closed
is related to SERVER-63971 Change server parameter to default to... Closed
Assigned Teams:
Replication
Participants:

 Description   

As a premise, 5.0 introduced an optimization for sharded transactions to return to the client after the decision was persisted but before the participating shards commit their local storage transactions. That optimization made it incorrect for linearizable reads to ignore prepare conflicts.

I have no evidence we actually change the prepare conflict behavior for linearizable reads, but we do have code that suggests we may have at some point. That code (according to a patch run) can be deleted.



 Comments   
Comment by Daniel Gottlieb (Inactive) [ 22/Mar/22 ]

Linearizable reads do enforce prepare conflicts at read time, as indicated here.

Yes, I agree that in practice, we do enforce prepared conflicts. Because of the code you linked.

The linked code in the description changes that prepare conflict behavior for the oplog write at the end of the operation.

I am also in agreement with this statement. However, because we are (correctly) enforcing prepared conflicts, it's unnecessary to change any prepare conflict configuration to do the oplog write at the end. If we did have some bug where we were ignoring prepare conflicts for linearizable reads, the code I linked would mask the bug instead of letting WT raise an error.

Comment by Judah Schvimer [ 21/Mar/22 ]

daniel.gottlieb, does this suggest there is a bug? Linearizable reads do enforce prepare conflicts at read time, as indicated here. The linked code in the description changes that prepare conflict behavior for the oplog write at the end of the operation.

Generated at Thu Feb 08 06:00:31 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.