Zakelly commented on code in PR #24698:
URL: https://github.com/apache/flink/pull/24698#discussion_r1577730173


##########
flink-core/src/main/java/org/apache/flink/core/state/StateFutureImpl.java:
##########
@@ -61,23 +66,34 @@ public <U> StateFuture<U> thenApply(Function<? super T, ? 
extends U> fn) {
                 return StateFutureUtils.completedFuture(r);
             } else {
                 StateFutureImpl<U> ret = makeNewStateFuture();
-                completableFuture.thenAccept(
-                        (t) -> {
-                            callbackRunner.submit(
-                                    () -> {
-                                        ret.complete(fn.apply(t));
-                                        callbackFinished();
-                                    });
-                        });
+                completableFuture
+                        .thenAccept(
+                                (t) -> {
+                                    callbackRunner.submit(
+                                            () -> {
+                                                ret.complete(fn.apply(t));
+                                                callbackFinished();
+                                            });
+                                })
+                        .exceptionally(
+                                (e) -> {
+                                    exceptionHandler.handleException(

Review Comment:
   Please note that the `exceptionHandler` here is for non-recoverable errors 
by framework. As for the recoverable ones (like state access timeout or 
something), there will be automatically retry in StateExecutor. In this layer, 
we only focus on the future-related stuff.



-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to