[SERVER-69560] change return type of TransactionParticipant::retrieveCompletedOperations() to a pointer Created: 09/Sep/22  Updated: 29/Oct/23  Resolved: 09/Sep/22

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

Type: Improvement Priority: Major - P3
Reporter: Benety Goh Assignee: Benety Goh
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-39017 Allow prepared transaction statements... Closed
is related to SERVER-69478 remove unnecessary copy in Transactio... Closed
Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2022-09-19
Participants:

 Description   

This function currently returns a non-const reference to the internal vector of operations for a multi-doc transaction. Since the expected usage of this function is to pass along a pointer to the internal operations to the OpObserver methods for committing multi-doc transactions, it would be nice to change the return type of this function from a reference to a pointer.

Making this change will help avoid accidental copies like the scenarios described in SERVER-69478.

This is a slight deviation from our code style for function input and outputs.



 Comments   
Comment by Githook User [ 09/Sep/22 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@users.noreply.github.com', 'username': 'benety'}

Message: SERVER-69560 TransactionParticipant::retrieveCompletedTransactionOperations() returns pointer instead of non-const reference
Branch: master
https://github.com/mongodb/mongo/commit/08b939c1c9081f20912111408b7d8201da551530

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