Bug 4755 - SPEC - Exit Status for Partitioned Steps is incorrect
SPEC - Exit Status for Partitioned Steps is incorrect
Product: jbatch
Classification: Unclassified
Component: source
All All
: P5 critical
: ---
Assigned To: cvignola
: 4784 (view as bug list)
Depends on:
  Show dependency treegraph
Reported: 2013-03-08 23:14 UTC by mminella
Modified: 2013-03-20 14:02 UTC (History)
2 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description mminella 2013-03-08 23:14:32 UTC
In section 8.7.2, the spec states that the default behavior for determining which exit status to use is to use the one provided by the last executing partition (the one that finishes last).  This is incorrect.  If I have a partition that fails quickly and others that complete and take longer, per the spec the step would be flagged as complete.  

I would recommend that the exit status of the worst case be taken out of the bunch in order of the following precedence: Abandon, Fail, Stop, Complete.  This would allow a partitioned step to be flagged as complete only if all of the partitions were completed successfully.
Comment 1 cvignola 2013-03-11 13:44:02 UTC
Yes, this section is not right - it contradicts itself because earlier it indicates that a failed or stopped partition will result in batch status of failed or stopped.  The bottom line is if the chunk or batchlet artifacts try to set exit status,  the resultant exit status is not predictable.  I think exit status for a partitioned step must handled by an artifact that runs outside the partitions themselves.  The PartitionAnalyzer is designed for this purpose.  So I think what we need to say, in essence is:

1. the result of individual partitions establishes batch status as follows:
1.1 if all partitions end in completed state, batch status is completed.
1.2 if any partition ends with in failed state, batch status is failed.
1.3 if any partition ends with in stopped state, batch status is stopped.

2. exit state for partitioned step defaults batch status UNLESS exit status is set by PartitionAnalyzer.

This is going into PFD v1.6.  Please reopen this bug if you disagree with the approach.
Comment 2 cvignola 2013-03-13 00:22:49 UTC
Correction:  not going into v1.6 - probably v1.7.
Comment 3 cvignola 2013-03-20 14:02:15 UTC
*** Bug 4784 has been marked as a duplicate of this bug. ***