It's good way to provide the custom extension of the compensating message.
But it's a challenge for the user to know about the whole compensation
message.

It's could more easier for the user to write the code by using forward
recovery which means we just let the omega retry the transaction method.


Willem Jiang

Blog: http://willemjiang.blogspot.com (English)
          http://jnn.iteye.com  (Chinese)
Twitter: willemjiang
Weibo: 姜宁willem

On Tue, Feb 6, 2018 at 10:46 PM, Eric Lee <[email protected]> wrote:

> Hi all,
>
> Currently, saga pack intercept all arguments to be processed by spring aop.
> However, when developers execute the SQL's update operations with
> complicate types like update the status, it will be really hard to
> compensate because neither alpha and omega knows what's the previous status
> before execute the update statement. In other words, it can not rollback to
> the original state by compensating.
>
> Possible solution:
> Add a new method for developers to customize their payloads needed to
> recover when compensating. Suppose we need to change the task status to
> DONE regardless of its previous status, before that, we just query for the
> current task status and save it to payloads which will be stored in alpha
> and return to omega when compensation happens. In this way, we can recover
> the task status to the original one.
>
> Any idea on this is welcome. Thanks.
>
>
> Best Regards!
> Eric Lee
>

Reply via email to