AHeise commented on code in PR #25353:
URL: https://github.com/apache/flink/pull/25353#discussion_r1771316608
##########
flink-runtime/src/main/java/org/apache/flink/streaming/runtime/translators/SinkTransformationTranslator.java:
##########
@@ -185,6 +188,58 @@ private void expand() {
}
}
+ private List<Transformation<?>> getSinkTransformations(int sizeBefore)
{
+ return executionEnvironment
+ .getTransformations()
+ .subList(sizeBefore,
executionEnvironment.getTransformations().size());
+ }
+
+ /**
+ * Disables UC for all connections of operators within the sink
expansion. This is necessary
+ * because committables need to be at the respective operators on
notifyCheckpointComplete
+ * or else we can't commit all side-effects, which violates the
contract of
+ * notifyCheckpointComplete.
+ */
+ private void disallowUnalignedCheckpoint(List<Transformation<?>>
sinkTransformations) {
+ Optional<Transformation<?>> writerOpt =
+
sinkTransformations.stream().filter(SinkExpander::isWriter).findFirst();
+ Preconditions.checkState(writerOpt.isPresent(), "Writer
transformation not found.");
+ Transformation<?> writer = writerOpt.get();
+ int indexOfWriter = sinkTransformations.indexOf(writer);
+
+ // check all transformation after the writer and recursively
disable UC for all inputs
Review Comment:
It's actually recursive. I have just written the recursive algorithm in an
iterative fashion to avoid any potential stack issues. But even in this form,
the algorithm is still recursive.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]