CrynetLogistics commented on a change in pull request #17345:
URL: https://github.com/apache/flink/pull/17345#discussion_r741056377



##########
File path: 
flink-connectors/flink-connector-base/src/main/java/org/apache/flink/connector/base/sink/writer/AsyncSinkWriter.java
##########
@@ -236,8 +273,16 @@ private void flush() {
                                 "Mark in-flight request as completed and 
requeue %d request entries",
                                 failedRequestEntries.size());
 
+        Consumer<Exception> fatalExceptionCons =
+                exception ->
+                        mailboxExecutor.execute(
+                                () -> {
+                                    throw exception;
+                                },
+                                "A fatal exception occurred in the sink that 
cannot be recovered from or should not be retried.");
+
         inFlightRequestsCount++;
-        submitRequestEntries(batch, requestResult);
+        submitRequestEntries(batch, requestResult, fatalExceptionCons);

Review comment:
       Sound good to me !




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


Reply via email to