[SERVER-72503] Don't allow split sessions and their top-level sessions to be expired/reaped Created: 04/Jan/23  Updated: 27/Oct/23  Resolved: 17/Mar/23

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

Type: Task Priority: Major - P3
Reporter: Wenbin Zhu Assignee: Backlog - Replication Team
Resolution: Works as Designed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Replication
Participants:

 Description   

The sessions in the InternalSessionPool currently have a fixed timeout of 15 minutes.  Since they hold prepared transactions, these split sessions cannot be allowed to time out.

To avoid expiration of the top-level session, canBeReaped() on the TransactionParticipant will be modified to return false whenever split sessions exist (this can be done by checking the SplitPrepareSessionManager or adding a new SplitPrepareMode state in TransactionParticipant and checking for that).



 Comments   
Comment by Wenbin Zhu [ 11/Jan/23 ]

After looking into the InternalSessionPool code, I don't think we need to do anything for the split sessions because the InternalSessionPool only reaps sessions that have been released to the pool. For the top-level sessions, we probably don't need to worry about them either, because after apply split transactions as secondary, we should update the top-level transactionParticipant's state. canBeReaped() won't return true if the transaction is open (i.e. transactionParticipant's state is either kInProgress or kPrepared). Therefore we're going to deprioritize this ticket at this moment and revisit it after finishing the core logics.

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