dtm icon indicating copy to clipboard operation
dtm copied to clipboard

Support Saga options RetryLimit

Open yedf2 opened this issue 3 years ago • 4 comments

If retry count is greater than RetryLimit, then Saga transaction stop retrying, and rollback.

yedf2 avatar May 18 '22 12:05 yedf2

i would like to do this.

fengyuwusong avatar Jul 26 '22 02:07 fengyuwusong

3q

yedf2 avatar Jul 26 '22 06:07 yedf2

Good Job! PR has been merged.

In production, if some service has some problem, it may take minutes to recover. So if dtm retry several times without sleeping, then dtm may abort the transaction before the service recovered.

A better strategy is to sleep before retrying, just like the next_cron_interval do. Can you replace the field next_cron_interval by retry_count, and add the testing of retry_count against RetryLimit there?

yedf2 avatar Aug 18 '22 02:08 yedf2

OK, I understand the scene you said and will finish it in my spare time.

fengyuwusong avatar Aug 18 '22 03:08 fengyuwusong