JNSimba commented on code in PR #113:
URL:
https://github.com/apache/doris-kafka-connector/pull/113#discussion_r4703502490
##########
src/main/java/org/apache/doris/kafka/connector/writer/load/AsyncDorisStreamLoad.java:
##########
@@ -73,6 +79,12 @@ public class AsyncDorisStreamLoad extends DataLoad {
private final AtomicBoolean started;
private volatile boolean loadThreadAlive = false;
private AtomicReference<Throwable> exception = new AtomicReference<>(null);
+ // Set for the lifetime of this object once a load failed and its retries
were exhausted:
+ // the failed buffer is dropped and the records it held can only be
recovered by replaying
+ // from the last committed Kafka offsets (task restart). start() restarts
the executor
+ // thread but must not clear this latch, otherwise later commits could
advance offsets
+ // past the records that were dropped by the failed load.
+ private final AtomicBoolean loadFailed = new AtomicBoolean(false);
Review Comment:
What is the difference between `loadFailed` and `exception`? What is the
difference between `loadFailed` and `exception`? Wouldn't it work to just
remove `exception.set(null)` from the `start` method?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]