stinger1206 commented on PR #113: URL: https://github.com/apache/doris-kafka-connector/pull/113#issuecomment-7158423976
Thanks for the feedback. I agree that preserving automatic recovery from transient failures, such as a BE restart, would be preferable. The problem with the current retry strategy is that Kafka Connect retries the current `put()` batch, which may not contain the records from the failed asynchronous load. `AsyncStreamLoadWriter` replaces its buffer after enqueueing it, and `LoadAsyncExecutor` clears the queue on failure. When the executor restarts, the exception is reset, but records from earlier successful `put()` calls may no longer be available for retry. Subsequent offset commits can therefore advance past those records. The latch prevents this unsafe recovery path, but it does limit automatic recovery. I agree that retrying the failed load itself would be a better solution. To make this safe, we need to preserve the in-flight and pending buffers, handle ambiguous load outcomes and redelivered records, and prevent offset advancement until the unresolved loads complete. I can update this PR accordingly, retaining the failure latch as a fallback when safe recovery is no longer possible. -- 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]
