Skip to content

Commit

Permalink
[Improve](batch) change label when batch streamload retry (apache#523)
Browse files Browse the repository at this point in the history
  • Loading branch information
JNSimba authored Dec 5, 2024
1 parent 2f26c8f commit 908bddb
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
import org.apache.doris.flink.sink.EscapeHandler;
import org.apache.doris.flink.sink.HttpPutBuilder;
import org.apache.doris.flink.sink.HttpUtil;
import org.apache.doris.flink.sink.LoadStatus;
import org.apache.doris.flink.sink.writer.LabelGenerator;
import org.apache.http.client.entity.GzipCompressingEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
Expand Down Expand Up @@ -481,11 +480,6 @@ public void load(String label, BatchRecordBuffer buffer) throws IOException {
lock.unlock();
}
return;
} else if (LoadStatus.LABEL_ALREADY_EXIST.equals(
respContent.getStatus())) {
// todo: need to abort transaction when JobStatus not finished
putBuilder.setLabel(label + "_" + retry);
reason = respContent.getMessage();
} else {
String errMsg = null;
if (StringUtils.isBlank(respContent.getMessage())
Expand Down Expand Up @@ -522,6 +516,7 @@ public void load(String label, BatchRecordBuffer buffer) throws IOException {
// get available backend retry
refreshLoadUrl(buffer.getDatabase(), buffer.getTable());
putBuilder.setUrl(loadUrl);
putBuilder.setLabel(label + "_" + retry);
}
buffer.clear();
buffer = null;
Expand Down

0 comments on commit 908bddb

Please sign in to comment.