I think we are talking about the order of the compensations. By checking
the codes of EventScanner.java, it seems that it calls the compensate
method with the omegaCallback by the order of the commands saving in the
database. So I think in the situation of
-------------------------------------
| B Start | A Start | A End | B End | Aborted
-------------------------------------

The Compensate B will happen before the Compensate A and we can
not guarantee the order of the compensations as we expect A before B.

Amos

2018-08-01 21:30 GMT+08:00 Willem Jiang <[email protected]>:

> Hi,
>
> You just bring up an very interesting topic here.
> Once Alpha get the Aborted event,  it means it should call the compensation
> method of all the succeed method.
> When the EventScanner check the event, it will find out all the succeed
> events (with the start and end events), even the events are not in the
> right order.
>
>
> Willem Jiang
>
> Twitter: willemjiang
> Weibo: 姜宁willem
>
> On Wed, Aug 1, 2018 at 6:46 PM, 黎 先生 <[email protected]> wrote:
>
> > Suppose there are two processes A and B. A process calls an interface
> > provided by B. When the TxAbortEvent is thrown, the compensation of B
> > (CompB) is supposed to be executed prior to the compensation of A(CompB).
> >
> > ------------      ------------
> > |   Alpha  |      |   Omega  |
> > ------------  <-  ------------
> > |          |       |Process B |
> > ------------      ------------
> >      ^                  ^
> >      |                  |
> > ------------            | call
> > |   Omega  |            |
> > ------------    ---------
> > |Process A |
> > ------------
> >
> > At alpha, the tracing queue is expected to be
> >
> > Expected
> > -------------------------------------
> > | A Start | A End | B Start | B End | Aborted
> > -------------------------------------
> >
> > For some reason(e.g. network problem), however, the actual tracing queue
> > looks like this.
> >
> > Actual:
> > -------------------------------------
> > | B Start | A Start | A End | B End | Aborted
> > -------------------------------------
> >
> > In such situation, is CompA executed prior to CompB?
> >
> >
>

Reply via email to