Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

only fast-track jobs with exactly one chunk #3879

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
type: fix
issue: 3878
title: "Previously, if an intermediate step of a gated batch job produced no output data, an exception would be thrown
and processing of the step would abort, leaving the batch job in an unrecoverable state. This has been fixed."
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ public boolean firstStepProducedNothing() {
return myJobWorkCursor.isFirstStep && getWorkChunkCount() == 0;
}

public boolean hasExactlyOneChunk() {
return getWorkChunkCount() == 1;
}

public JobDefinitionStep<PT,IT,OT> getTargetStep() {
return myJobWorkCursor.currentStep;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ private void handleGatedExecution(BaseDataSink<PT, IT, OT> theDataSink) {
jobInstance.setJobDefinition(myDefinition);
JobInstanceProgressCalculator calculator = new JobInstanceProgressCalculator(myJobPersistence, jobInstance, new JobChunkProgressAccumulator());
calculator.calculateAndStoreInstanceProgress();
} else {
} else if (theDataSink.hasExactlyOneChunk()) {
JobWorkNotification workNotification = new JobWorkNotification(jobInstance, myCursor.nextStep.getStepId(), ((JobDataSink<PT,IT,OT>) theDataSink).getOnlyChunkId());
myBatchJobSender.sendWorkChannelMessage(workNotification);
}
Expand Down