[SERVER-66527] Extend SyncTransactionWithRetries to support retrieving the operation time of commit transaction. Created: 17/May/22  Updated: 27/Oct/23  Resolved: 19/May/22

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

Type: Task Priority: Major - P3
Reporter: Mark Benvenuto Assignee: Jack Mulrow
Resolution: Works as Designed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-66528 Return the OpTime of Commit Transacti... Closed
Participants:

 Description   

SyncTransactionWithRetries is used to do one or more CRUD operations in a transaction and then commit the transaction. To support casual consistency, mongod must return the OpTime in CRUD commands.

A FLE2 insert consists of several inserts and one commit. FLE 2 needs to return the OpTime of
of commit transaction command that TransactionWithRetries::run executes to the client, no the operation time of the last commit.

SyncTransactionWithRetries needs to be enhanced to return the OpTime of the commit or provide a way for callers to retrieve so the OpTime can be returned to callers



 Comments   
Comment by Jack Mulrow [ 17/May/22 ]

SyncTransactionWithRetries already tracks the operationTime of the commitTransaction command (it actually tracks the operationTime from the latest response, which will be the commit response for successful transactions) and will set it on both the caller's opCtx's OperationTimeTracker and the caller's client's ReplClientInfo. operationTime in responses from mongos comes from the OperationTimeTracker and from mongod comes from the ReplClientInfo, so I believe this should already be taken care of. If FLE is doing something more exotic, the operationTime can be taken directly from those components.

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