GitHub user funky-eyes added a comment to the discussion: Enhancing Transaction 
Handling for TimeoutRollbacked and Rollbacked States

I believe this code is already 80% complete, and the remaining work is to 
refine some details.
Since the business thread process involves changing the globalsession status to 
"end" and then performing the deletion, there will be a concurrency issue 
between this asynchronous thread and the Seata-server's business thread. 
Therefore, there is a timeToDeadSession method in the globalsession. When its 
return value is less than or equal to 0, we can assume that the transaction 
needs to be compensated. Of course, this timeToDeadSession method is more 
relevant for ongoing statuses like "rollbacking" or "committing." For 
transactions in the "end" status, I believe the interval can be shortened. This 
way, it is possible to handle transactions in the "end" state in a thread-safe 
manner without using locks.

GitHub link: 
https://github.com/apache/incubator-seata/discussions/7146#discussioncomment-12116286

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to