DavidLiu001 commented on code in PR #22241:
URL: https://github.com/apache/flink/pull/22241#discussion_r1148340558
##########
flink-connectors/flink-connector-base/src/main/java/org/apache/flink/connector/base/sink/throwable/FatalExceptionClassifier.java:
##########
@@ -44,6 +44,8 @@ public FatalExceptionClassifier(
public boolean isFatal(Throwable err, Consumer<Exception>
throwableConsumer) {
if (validator.test(err)) {
throwableConsumer.accept(throwableMapper.apply(err));
+ return true;
+ } else {
Review Comment:
> > > Dont think we should return `false` right after validator.test is
`false` as it wont go into `chainedClassifier` check. Instead, we should return
false at the line 55.
> > > Good comment, PR was updated. A little difference,
`chainedClassifier` check includes `false` and `true`, It seems that new
"return false" is not needed.
>
> If we carry on to `chainedClassifier` check, the result is being `false`,
isn't it? so if there is nothing to check from `chainedClassifier`
(`chainedClassifier` is `null`), shouldn't we return `false`?
Good discussion. Since `chainedClassifier` is a private memeber of
FatalExceptionClassifier and when a chain is created, there is
`chainedClassifier` to be used, if `chainedClassifier` is `null`, it can cause
fatal exception. When `chainedClassifier` is `null`, do you think we should
return `false` not `true` ?
--
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]