fapaul commented on a change in pull request #17687:
URL: https://github.com/apache/flink/pull/17687#discussion_r745415547



##########
File path: 
flink-connectors/flink-connector-base/src/main/java/org/apache/flink/connector/base/sink/writer/AsyncSinkWriter.java
##########
@@ -142,6 +188,16 @@ protected abstract void submitRequestEntries(
      */
     protected abstract long getSizeInBytes(RequestEntryT requestEntry);
 
+    /**
+     * The {@code accept} method should be called on this Consumer if the 
processing of the {@code
+     * requestEntries} raises an exception that should not be retried. 
Specifically, any action that
+     * we are sure will result in the same exception no matter how many times 
we retry should raise
+     * a {@code RuntimeException} here. For example, wrong user credentials. 
However, it is possible
+     * intermittent failures will recover, e.g. flaky network connections, in 
which case, some other
+     * mechanism may be more appropriate.
+     */
+    protected final Consumer<Exception> fatalExceptionCons;

Review comment:
       Nit: I'd favor having a protected getter over the direct field access.




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