Hi, Pack Team

Currently, Alpha compensation mechanism has some defects [1], I plan to
solve this problem step by step [2]

Step1: Modify the OnConnected method to bidirectional streaming RPC

           This will be needed for the Step2

Step2: Custom compensation exception rules to distinguish between business
compensation exceptions and framework compensation exceptions for FSM.

           After calling the compensation method, Alpha needs to wait for
Omega to send a compensation result message. The message type is as follows:

           Successful compensation:
           Business compensation failure:business code throws an exception,
Do not switch Omega instance and retry(Retry rule is implemented in the
Step3)
           Omega compensation failure: omega code throws an exception,
switch other Omega instance and retry(Retry rule is implemented in the
Step3)


Step3. Added retry and timeout rule to compensate for failures

           Exceeded the number of retries or timeout will change state to
suspended

Any Suggestion?

[1] https://github.com/apache/servicecomb-pack/issues/590
[2] https://github.com/apache/servicecomb-pack/pull/607

Best regards,
Lei Zhang

Reply via email to