[SERVER-69120] Improve error code for checking lastCommittedOpTime in TransactionParticipant Created: 24/Aug/22  Updated: 05/Dec/22  Resolved: 12/Sep/22

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

Type: Task Priority: Major - P3
Reporter: Jason Zhang Assignee: Backlog - Replication Team
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Replication
Participants:

 Description   

Currently, we throw InvalidOptions when checking the lastCommittedOpTime for a commitTransaction command. While this isn't necessarily a bug for proper usage of two phase commit (since we ignore this error and auto retry in the transaction coordinator), in testing it is possible that we run a commitTransaction before the lastCommittedOpTime has been recovered (BF-25428). This ticket is to track/discuss whether or not the error code should instead be a retryable one. 



 Comments   
Comment by Lingzhi Deng [ 12/Sep/22 ]

Chatted with jason.zhang@mongodb.com, the commitTransaction command would be retried by the coordinator here. So the error in question (InvalidOptions) would never get back to the end users. So this shouldn't be a user-facing issue unless they manually run prepareTransaction and commitTransaction. So this should be a testing issue only and I am closing this as "Won't fix".

CC judah.schvimer@mongodb.com

Comment by Jason Zhang [ 12/Sep/22 ]

Yeah it gets repeatedly retried in this doWhile loop since InvalidOptions isn't one of the error codes the loop exits on.

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