From 4a98a4692d1de9e0837639ca2eb78ec49da579f4 Mon Sep 17 00:00:00 2001 From: wudi <676366545@qq.com> Date: Fri, 11 Oct 2024 18:30:36 +0800 Subject: [PATCH] update --- .../apache/doris/flink/sink/writer/LabelGenerator.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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 637c96918..7e58bb810 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 @@ -56,10 +56,13 @@ public String generateTableLabel(long chkId) { String label = String.format("%s_%s_%s_%s", labelPrefix, tableIdentifier, subtaskId, chkId); if (enable2PC) { return label; - } else if (LABEL_PATTERN.matcher(label).matches()) { - return label + "_" + UUID.randomUUID(); } else { - return String.format("%s_%s_%s_%s", labelPrefix, subtaskId, chkId, UUID.randomUUID()); + label = label + "_" + UUID.randomUUID(); + if (LABEL_PATTERN.matcher(label).matches()) { + return label; + } else { + return labelPrefix + "_" + subtaskId + "_" + chkId + "_" + UUID.randomUUID(); + } } }