JNSimba commented on code in PR #113:
URL:
https://github.com/apache/doris-kafka-connector/pull/113#discussion_r4703495238
##########
src/main/java/org/apache/doris/kafka/connector/writer/load/AsyncDorisStreamLoad.java:
##########
@@ -263,13 +348,29 @@ public void load(String label, RecordBuffer buffer)
throws IOException {
if (respContent == null || respContent.getMessage() ==
null) {
throw new StreamLoadException("response error : " +
loadResult);
}
- if
(!DORIS_SUCCESS_STATUS.contains(respContent.getStatus())) {
+ boolean confirmedFinishedDuplicate =
+
LABEL_ALREADY_EXISTS_STATUS.equals(respContent.getStatus())
+ && EXISTING_JOB_STATUS_FINISHED.equals(
+ respContent.getExistingJobStatus())
+ && label != null
+ && label.equals(respContent.getLabel());
+ if (!DORIS_SUCCESS_STATUS.contains(respContent.getStatus())
+ && !confirmedFinishedDuplicate) {
+ // a duplicate-label rejection without a FINISHED
existing job is
+ // ambiguous: the existing load may still be running
or may have
+ // failed, so it keeps failing until it resolves or
retries end
Review Comment:
Based on the way it’s written above, can this just be deleted?
--
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]