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


##########
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:
   Shall we allow the handler return something (e.g. default fallback value)? 
if the execption is recoveryable, we can continue the operation. This behaviour 
also matched the `exceptionally` function.



-- 
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