[ https://issues.apache.org/jira/browse/IGNITE-21762?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexander Lapin updated IGNITE-21762: ------------------------------------- Description: h3. Motivation As mentioned in IGNITE-21761 it's valid to remove finished transaction when cleanup is fully replicated over all enlisted partitions. However it's possible that commitPartition that triggers cleanup after txnState update will drop right after a state update but before sending a cleanup request, or it'll be killed during cleanup result processing, or commit partition primary replica will be re-elected, so many bad options... All in all that means, that in order to mark persistent txnState as ready for removal it's required to re-send cleanup request on commit partition primary replica election even if it was previously finished. h3. Definition of Done * Populate txn persistent state with enlisted partitions on txnState update. It's required in order to determine the list of nodes to which the cleanup request will need to be sent. * In an asynchronous manner on commit partition primary replica election, scan local persistent txn state storage and send cleanup request in a durable manner. We should not use the thread of primary replica election notification for that. * On cleanup completion, meaning cleanup replication over majorities of all enlisted partitions txnStateVolatileMap will be populated with stamped txnState because of logic introduced in IGNITE-21761 was: h3. Motivation As mentioned in IGNITE-21761 it's valid to remove finished transaction when cleanup is fully replicated over all enlisted partitions. However it's possible that commitPartition that triggers cleanup after txnState update will drop right after state update but before sending cleanup request, or it'll be killed during cleanup result processing, or commit partition primary replica will be re-elected, so many bad options... All in all that means, that in order to mark persistent txnState as ready for removal it's required to re-send cleanup even if it was previously finished on commit partition primary replica re-election. h3. Definition of Done * Populate txn persistent state with enlisted partitions on txnState update. It's required in order to define the set of nodes where cleanup should be send on commit partition primary replica re-election, including commit parition restart. > Do the txn cleanup procedure for all local finished transactions on > commitPartition primary replica election > ------------------------------------------------------------------------------------------------------------ > > Key: IGNITE-21762 > URL: https://issues.apache.org/jira/browse/IGNITE-21762 > Project: Ignite > Issue Type: Improvement > Reporter: Alexander Lapin > Priority: Major > Labels: ignite-3 > > h3. Motivation > As mentioned in IGNITE-21761 it's valid to remove finished transaction when > cleanup is fully replicated over all enlisted partitions. However it's > possible that commitPartition that triggers cleanup after txnState update > will drop right after a state update but before sending a cleanup request, or > it'll be killed during cleanup result processing, or commit partition primary > replica will be re-elected, so many bad options... > All in all that means, that in order to mark persistent txnState as ready for > removal it's required to re-send cleanup request on commit partition primary > replica election even if it was previously finished. > h3. Definition of Done > * Populate txn persistent state with enlisted partitions on txnState update. > It's required in order to determine the list of nodes to which the cleanup > request will need to be sent. > * In an asynchronous manner on commit partition primary replica election, > scan local persistent txn state storage and send cleanup request in a durable > manner. We should not use the thread of primary replica election notification > for that. > * On cleanup completion, meaning cleanup replication over majorities of all > enlisted partitions txnStateVolatileMap will be populated with stamped > txnState because of logic introduced in IGNITE-21761 -- This message was sent by Atlassian Jira (v8.20.10#820010)