davidradl commented on code in PR #26330:
URL: https://github.com/apache/flink/pull/26330#discussion_r2005968240
##########
flink-runtime/src/main/java/org/apache/flink/streaming/api/checkpoint/CheckpointedFunction.java:
##########
@@ -169,4 +169,15 @@ public interface CheckpointedFunction {
* @throws Exception Thrown, if state could not be created ot restored.
*/
void initializeState(FunctionInitializationContext context) throws
Exception;
+
+ /**
+ * This method is called when a snapshot for a checkpoint is requested.
Execution of this method
+ * does not block the main thread, is performed in an asynchronous thread
pool.
+ *
+ * @param context the context for drawing a snapshot of the operator
+ * @throws Exception Thrown and task will be failed, if state could not be
created ot restored.
Review Comment:
nit: maybe rephrase to be a little clearer.
- If you don't want to task fail, can throw a
RetriableAsyncOperateException, I am not sure who the you is here.
Would the following be correct:
A <ode>RetriableAsyncOperateException</code> thrown by this method indicates
that the checkpoint has failed but the Async checkpoint operation can be
retried. Other <code>Exception</code>s indicate that the the checkpoint should
not be retried so the task will fail.
Furthermore I think it would be better to not throw Exception on these
methods, all the specific Exception types that are likely to be thrown should
be explicitly on these methods to the contract is explicit. Then we can detail
the appropriately for each Exception type.
--
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]