Skip to content
Closed
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
Expand Up @@ -191,16 +191,14 @@ public final CompletionStage<Void> onMessageAsync(M message, MessageCollector co
.toArray(CompletableFuture[]::new));
});

result.thenAccept(x -> {
return result.thenAccept(x -> {
WatermarkFunction watermarkFn = getOperatorSpec().getWatermarkFn();
if (watermarkFn != null) {
// check whether there is new watermark emitted from the user function
Long outputWm = watermarkFn.getOutputWatermark();
propagateWatermark(outputWm, collector, coordinator);
}
});

return result;
}

/**
Expand Down Expand Up @@ -415,7 +413,7 @@ private CompletionStage<Void> onWatermark(long watermark, MessageCollector colle
.toArray(CompletableFuture[]::new));
}

watermarkFuture.thenCompose(res -> propagateWatermark(outputWm, collector, coordinator));
watermarkFuture = watermarkFuture.thenCompose(res -> propagateWatermark(outputWm, collector, coordinator));
}

return watermarkFuture;
Expand Down