zhuzhurk commented on code in PR #21807:
URL: https://github.com/apache/flink/pull/21807#discussion_r1095298270
##########
docs/content/docs/deployment/speculative_execution.md:
##########
@@ -92,6 +88,31 @@ No extra change is required for other sources to work with
speculative execution
and {{< gh_link
file="/flink-core/src/main/java/org/apache/flink/api/connector/source/Source.java"
name="new sources" >}}.
All the source connectors offered by Apache Flink can work with speculative
execution.
+### Enable Sinks for Speculative Execution
+Speculative execution is disabled by default for a sink unless it implements
{{< gh_link
file="/flink-core/src/main/java/org/apache/flink/api/common/SupportsConcurrentExecutionAttempts.java"
name="SupportsConcurrentExecutionAttempts" >}}
+interface. This is due to compatibility considerations.
+```java
+public interface SupportsConcurrentExecutionAttempts {}
+```
+The {{< gh_link
file="/flink-core/src/main/java/org/apache/flink/api/common/SupportsConcurrentExecutionAttempts.java"
name="SupportsConcurrentExecutionAttempts" >}}
+works for {{< gh_link
file="/flink-core/src/main/java/org/apache/flink/api/connector/sink2/Sink.java"
name="Sink" >}}
+, {{< gh_link
file="/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/sink/SinkFunction.java"
name="SinkFunction" >}}
+and {{< gh_link
file="/flink-core/src/main/java/org/apache/flink/api/common/io/OutputFormat.java"
name="OutputFormat" >}}.
+
+{{< hint info >}}
+Currently, Flink respects chaining strategy first rather than speculative
execution.
+It means that Flink calculates chaining strategy first, then checks the task
with chained operators could support speculative execution or not.
+If there is any operator in the task does not support speculative execution,
the speculative execution would be disabled for this task.
Review Comment:
Maybe update it according to the zh statement as well?
I think why we put this hint in this section is because currently only sinks
are possible to not implement SupportsConcurrentExecutionAttempts. So It's
better to make it clear so that users can be aware of it.
--
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]