"Then" block is executed even if "TransitionTo" is rollbacked

瀏覽次數:16 次
跳到第一則未讀訊息

Roman Prykhodko

未讀,
2016年11月30日 凌晨3:58:342016/11/30
收件者:masstransit-discuss

Hi, guys.

In this block 


During(Active,

When(Submitted)

.Then(...)

.TransitionTo(Ordered),

 

We can get the following situation:  all code in Then block has been executed, but  TransitionTo  has started but then i's transaction rollbacked for some reason (i.e. deadlock and so on). It's OK with TransitionTo  - it will be repeated due to Retry mechanism. But as for Then - we get situation when it executed when it must't to do it and i't action cant't be rollbacked. How can I solve this problem? How can I be ensured that TransitionTo  has committed successfully and only than execute Then  block?

Executing 
TransitionTo before Then doesn't help, because TransitionTo and Then are executing concurrently, and in most cases  Then is faster.


回覆所有人
回覆作者
轉寄
0 則新訊息