[SERVER-75800] Batch prepared commitTransaction/abortTransaction entries when possible Created: 06/Apr/23  Updated: 29/Oct/23  Resolved: 25/Apr/23

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

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

Issue Links:
Backports
Related
Backwards Compatibility: Fully Compatible
Backport Requested:
v7.0
Sprint: Repl 2023-04-17, Repl 2023-05-01
Participants:

 Description   

This is a follow-up of SERVER-72502, which batches prepareTransaction entries, while leaving commitTransaction/abortTransaction entries to be processed individually. Technically commits and aborts can be batched with other non-prepare oplog entries, except for certain edge cases (e.g. the prepareTransaction entries that they refer to are prepared prior to stepdown or prepared during to recovery/rollback, in which cases the prepared transactions have not been split). We cannot use splitSessionManager to check for transaction being split in OplogBatcher since that has race with OplogApplier, we need to investigate and do it in another way.

EDIT: We ended up only allowing commitTransaction/abortTransaction to be batched with other commitTransaction/abortTransaction entries. This is good enough in terms of performance and introduces less risks.



 Comments   
Comment by Githook User [ 24/Apr/23 ]

Author:

{'name': 'Wenbin Zhu', 'email': 'wenbin.zhu@mongodb.com', 'username': 'WenbinZhu'}

Message: SERVER-75800 Allow commitTransaction and abortTransaction entries to be batched with themselves.
Branch: master
https://github.com/mongodb/mongo/commit/be2b4a191ec938448fb4c5c601fe27955b66605f

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