It's quite important that we can get the feedback from Omega when calling the compensation method. +1 for this PR (we already merged it).
Current we also need to update the status of the transaction in Alpha to keep the track of whole process. Willem Jiang Twitter: willemjiang Weibo: 姜宁willem On Mon, Nov 25, 2019 at 5:13 PM Zhang Lei <coolbee...@gmail.com> wrote: > > 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