Skip to content

Commit

Permalink
Merge pull request Netflix#3573 from marosmars/fixMissingOutputs
Browse files Browse the repository at this point in the history
Fix disappearing outputs from long running tasks
  • Loading branch information
v1r3n authored Apr 11, 2023
2 parents 92ad530 + 2285531 commit 3d9b27f
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,12 @@ public void setWorkerId(String workerId) {
@JsonIgnore
public Map<String, Object> getOutputData() {
if (!outputPayload.isEmpty() && !outputData.isEmpty()) {
outputData.putAll(outputPayload);
// Combine payload + data
// data has precedence over payload because:
// with external storage enabled, payload contains the old values
// while data contains the latest and if payload took precedence, it
// would remove latest outputs
outputPayload.forEach(outputData::putIfAbsent);
outputPayload = new HashMap<>();
return outputData;
} else if (outputPayload.isEmpty()) {
Expand Down

0 comments on commit 3d9b27f

Please sign in to comment.