Bugzilla – Bug 4755
SPEC - Exit Status for Partitioned Steps is incorrect
Last modified: 2013-03-20 14:02:15 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.
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.
Correction: not going into v1.6 - probably v1.7.
*** Bug 4784 has been marked as a duplicate of this bug. ***