From 84b9bdac2b1c6231796daf714030cfc86ff3bca5 Mon Sep 17 00:00:00 2001 From: wudi <676366545@qq.com> Date: Fri, 13 Oct 2023 11:56:35 +0800 Subject: [PATCH] [improve] add ckptid in label when 2pc false (#207) Currently, when 2pc is closed, the label will only splice the uuid without adding the ckid, which is inconvenient to locate the problem. --- .../org/apache/doris/flink/sink/writer/LabelGenerator.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/flink-doris-connector/src/main/java/org/apache/doris/flink/sink/writer/LabelGenerator.java b/flink-doris-connector/src/main/java/org/apache/doris/flink/sink/writer/LabelGenerator.java index 35edae9e2..235b553d0 100644 --- a/flink-doris-connector/src/main/java/org/apache/doris/flink/sink/writer/LabelGenerator.java +++ b/flink-doris-connector/src/main/java/org/apache/doris/flink/sink/writer/LabelGenerator.java @@ -31,7 +31,8 @@ public LabelGenerator(String labelPrefix, boolean enable2PC) { } public String generateLabel(long chkId) { - return enable2PC ? labelPrefix + "_" + chkId : labelPrefix + "_" + UUID.randomUUID(); + String label = labelPrefix + "_" + chkId; + return enable2PC ? label : label + "_" + UUID.randomUUID(); } public String generateBatchLabel() {