Github user aljoscha commented on a diff in the pull request:
https://github.com/apache/flink/pull/6066#discussion_r190510791
--- Diff:
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/StreamOperator.java
---
@@ -93,6 +93,20 @@
// state snapshots
//
------------------------------------------------------------------------
+ /**
+ * This method is called when the operator should do a snapshot, before
it emits its
+ * own checkpoint barrier. This method is intended not for any actual
state persistence,
+ * but only for emitting some data before emitting the checkpoint
barrier.
+ *
+ * <p><b>Important:</b> This method should not be used for any actual
state snapshot logic, because
+ * it will inherently be within the synchronous part of the operator's
checkpoint. If heavy work is done
+ * withing this method, it will affect latency and downstream
checkpoint alignments.
--- End diff --
typo: withing -> within
---