ode-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sathwik Bantwal Premakumar (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ODE-1066) Unstable work of compensation activity
Date Wed, 31 May 2017 10:47:05 GMT

    [ https://issues.apache.org/jira/browse/ODE-1066?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16030975#comment-16030975
] 

Sathwik Bantwal Premakumar commented on ODE-1066:
-------------------------------------------------

Attaching the patch (ODE-1066-CompensationHandler-working.patch) which takes into account
the scopeEndTime in conformance to the bpel spec 12.5.2. Default Compensation Order. 

CH ordering within the Collection, SortedSet is based on 
1) decreasing order of scopeEndTime, 
2) In cases where scopeEndTime are equal then look towards ascending order of scopeStartime
3) if both scopeEndTime & scopeStartTime are equal then go with ascending order of hashcode()
of the CH.

Given below is a snippet of logs

Execution of FlightReservationProcess.zip 
{code:xml}
Sequential Execution
--------------------
[
{CompensationHandler ch=CompensationChannel#61, scope={ScopeFrame: o={OScope 'ReserveAbstractScope'
id=109}, id=4005}},
{CompensationHandler ch=CompensationChannel#48, scope={ScopeFrame: o={OScope 'ReserveHotelScope'
id=89}, id=4004}},
{CompensationHandler ch=CompensationChannel#35, scope={ScopeFrame: o={OScope 'ReserveCarScope'
id=69}, id=4003}}
]
{code}

Execution of FlightReservationProcess-parallel-scopes.zip 
-------------------------------------------------------------------------
{code:xml}
[
 {CompensationHandler ch=CompensationChannel#73, scope={ScopeFrame: o={OScope 'ReserveHotelScope'
id=92}, id=16268}},
 {CompensationHandler ch=CompensationChannel#72, scope={ScopeFrame: o={OScope 'ReserveCarScope'
id=71}, id=16269}}, 
 {CompensationHandler ch=CompensationChannel#70, scope={ScopeFrame: o={OScope 'ReserveAbstractScope'
id=113}, id=16270}}
]

We can see that the started time of the sequence activities containing the car,hotel and abs
scope are same, though the completed time is different because of the use of breakpoints to
capture the order of CH in the TreeSet. Without the breakpoints one can also see that sometimes
the completion time is also same.

sequence-activity-line-181 encloses Hotel scope
sequence-activity-line-212 encloses Abs scope
sequence-activity-line-153 encloses Car scope

Timeline of parallel executing scopes
----------------------------------------------
{
    "name": "sequence-activity-line-181",
    "type": "OSequence",
    "status": "COMPLETED",
    "enabled": "2017-05-31T14:57:36.231+05:30",
    "started": "2017-05-31T14:57:36.231+05:30",
    "completed": "2017-05-31T14:57:54.117+05:30",
    "aiid": 19,
    "scope": {
      "siid": 16267,
      "name": "ReservationProcess",
      "modelId": 0,
      "status": "FAULTED"
    }
  },
  {
    "name": "sequence-activity-line-212",
    "type": "OSequence",
    "status": "COMPLETED",
    "enabled": "2017-05-31T14:57:36.231+05:30",
    "started": "2017-05-31T14:57:36.231+05:30",
    "completed": "2017-05-31T14:57:48.697+05:30",
    "aiid": 18,
    "scope": {
      "siid": 16267,
      "name": "ReservationProcess",
      "modelId": 0,
      "status": "FAULTED"
    }
  },
  {
    "name": "sequence-activity-line-153",
    "type": "OSequence",
    "status": "COMPLETED",
    "enabled": "2017-05-31T14:57:36.231+05:30",
    "started": "2017-05-31T14:57:36.231+05:30",
    "completed": "2017-05-31T14:57:52.207+05:30",
    "aiid": 17,
    "scope": {
      "siid": 16267,
      "name": "ReservationProcess",
      "modelId": 0,
      "status": "FAULTED"
    }
  }
{code}

> Unstable work of compensation activity
> --------------------------------------
>
>                 Key: ODE-1066
>                 URL: https://issues.apache.org/jira/browse/ODE-1066
>             Project: ODE
>          Issue Type: Bug
>          Components: BPEL Runtime
>    Affects Versions: 1.3.6
>         Environment: Win7x64, Java 1.8.0_111, Tomcat 7.0.73
>            Reporter: Vitaliy Tkachenko
>         Attachments: FlightReservationProcess-parallel-scopes.zip, FlightReservationProcess.zip,
ODE-1066-CompensateGenerator.patch, ODE-1066-CompensationHandler.patch
>
>
> Compensation doesn't work appropriately, there is no guarantee that it will be processed
on execution. It doesn't matter which BPEL version is used either 1.1 or 2.0 and which method
is used to provide the compensation (either "compensate" or "compensateScope").
> If there are several scopes to compensate the most big chance to work out its compensation
handler has the last scope - it fails rarely but scopes defined prior to the last scope have
much bigger chances to fail. When compensation fails nothing is seen in the log, it just doesn't
work.
> Attaching the FlightReservationProcess application to reproduce the bug.
> Specify "all" in the input to execute compensation for all scopes, call it many times
and check how scopes are compensated. Each result 4, 5, 6 must contain "1" if the corresponding
scope "car", "hotel" , "asbstract" has been compensated. But in reality the most big probability
"abstract" scope has to include "1", it fails having the "0" pretty rarely. But other scopes
"car" and "hotel" fail oftenly, only in rare cases they contain "1" as being compensated.
You can also play including "car", "hotel", "abs" instead of all to  compensate only specified
scopes. E.g. use "car hotel" in the input to compensate these 2 scopes only.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message