servicecomb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zhang Lei <zhang_...@boco.com.cn>
Subject [Saga] About Omega's timeout process
Date Wed, 24 Apr 2019 11:09:14 GMT
At present, Omega's timeout only stores to the database, find timeout Tx transactions and compensation
through database scans. This may cause the commit of the Tx transaction after the compensation.
I think it can be improved TransactionAspect class, Terminates the execution of the method
when the timeout and throws a custom exception

So we can control the rollback of the transaction within the method when timeout. I wrote
an example to show my thoughts https://github.com/coolbeevip/playground/tree/master/timeoutaspect-demo
<https://github.com/coolbeevip/playground/tree/master/timeoutaspect-demo>

You can use ApplicationTest to quickly verify

Any suggestion? 


Lei Zhang
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message