GitHub user YongGoose closed a discussion: Enhancing Transaction Handling for 
TimeoutRollbacked and Rollbacked States

The current transaction processing logic in Seata is well-structured and 
efficient. However, handling transactions in the **TimeoutRollbacked** and 
**Rollbacked** states can be further improved to enhance stability and 
efficiency.  

### Releated Issue
- #6875 

### 📌 Proposal: Enhanced Transaction Processing  
To address these issues, I propose the following improvements

1️⃣ **Transaction Queue Introduction**  
- Both **committed** and **rolled-back** transactions will be added to a queue 
for more efficient state-based processing.  

2️⃣ **Enhanced Scheduler Functionality**  
- The scheduler will retrieve transactions from the queue and direct them to 
the appropriate processor based on their state.  

3️⃣ **Improved Rollback Processor**  
- A dedicated rollback processor will handle **rolled-back** transactions.  
- Successful rollbacks will be reported to the monitoring system.  
- Failed rollbacks will be sent to a **retry queue** for future reprocessing.  

### Sequence diagram
![image](https://github.com/user-attachments/assets/491afc5d-c62d-45a1-a4e6-55f010398b39)

With this approach, we can effectively mitigate issues related to 
**TimeoutRollbacked** and **Rollbacked** transaction states, improving overall 
transaction management stability.  

Looking forward to feedback and discussion on this proposal! 🚀

> I haven't been studying the Seata project for long yet. 
If there are any mistakes or areas where my understanding is lacking, I would 
greatly appreciate any feedback. 🙇🏻‍♂️

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

----
This is an automatically sent email for dev@seata.apache.org.
To unsubscribe, please send an email to: dev-unsubscr...@seata.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@seata.apache.org
For additional commands, e-mail: dev-h...@seata.apache.org

Reply via email to