
| Key: |
BATCH-357
|
| Type: |
Bug
|
| Status: |
Closed
|
| Resolution: |
Won't Fix
|
| Priority: |
Blocker
|
| Assignee: |
Unassigned
|
| Reporter: |
Lucas Ward
|
| Votes: |
0
|
| Watchers: |
0
|
|
If you were logged in you would be able to see more operations.
|
|
|
|
I'm not sure how the restart job is working, but when looking at the simpleStepExecutor, the following code exists for restart:
result = processChunk(step, contribution);
// TODO: check that stepExecution can
// aggregate these contributions if they
// come in asynchronously.
ExecutionAttributes statistics = stepContext.getExecutionAttributes();
contribution.setExecutionAttributes(statistics);
contribution.incrementCommitCount();
// If the step operations are asynchronous then we need
// to synchronize changes to the step execution (at a
// minimum).
synchronized (stepExecution) {
// Apply the contribution to the step
// only if chunk was successful
stepExecution.apply(contribution);
if (saveExecutionAttributes) {
stepExecution.setExecutionAttributes(stepContext.getExecutionAttributes());
}
jobRepository.saveOrUpdate(stepExecution);
Essentially, only the execution attributes from the step context are being persisted. However, the ItemReaders don't push to the context, they have ExecutionAttributes requested by the stream manager. As you can see above, streamManager.getExecutionAttributes() is not called.
|
|
Description
|
I'm not sure how the restart job is working, but when looking at the simpleStepExecutor, the following code exists for restart:
result = processChunk(step, contribution);
// TODO: check that stepExecution can
// aggregate these contributions if they
// come in asynchronously.
ExecutionAttributes statistics = stepContext.getExecutionAttributes();
contribution.setExecutionAttributes(statistics);
contribution.incrementCommitCount();
// If the step operations are asynchronous then we need
// to synchronize changes to the step execution (at a
// minimum).
synchronized (stepExecution) {
// Apply the contribution to the step
// only if chunk was successful
stepExecution.apply(contribution);
if (saveExecutionAttributes) {
stepExecution.setExecutionAttributes(stepContext.getExecutionAttributes());
}
jobRepository.saveOrUpdate(stepExecution);
Essentially, only the execution attributes from the step context are being persisted. However, the ItemReaders don't push to the context, they have ExecutionAttributes requested by the stream manager. As you can see above, streamManager.getExecutionAttributes() is not called. |
Show » |
|