This is an automated email from the ASF dual-hosted git repository. w41ter pushed a commit to branch branch-3.0 in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-3.0 by this push: new 1a331415a70 branch-3.0: [fix](catalog) Fix mark handling for failed tasks to maintain getLeftMarks #46205 (#46255) 1a331415a70 is described below commit 1a331415a70f34be28ce5462d3bf04d48e204618 Author: walter <maoch...@selectdb.com> AuthorDate: Thu Jan 2 15:36:22 2025 +0800 branch-3.0: [fix](catalog) Fix mark handling for failed tasks to maintain getLeftMarks #46205 (#46255) cherry pick from #46205 --- be/src/olap/data_dir.cpp | 2 +- .../java/org/apache/doris/common/MarkedCountDownLatch.java | 10 +++++++++- .../src/main/java/org/apache/doris/master/MasterImpl.java | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/be/src/olap/data_dir.cpp b/be/src/olap/data_dir.cpp index 4070bd1dd43..c3c9773b410 100644 --- a/be/src/olap/data_dir.cpp +++ b/be/src/olap/data_dir.cpp @@ -496,7 +496,7 @@ Status DataDir::load() { } if (rowset_partition_id_eq_0_num > config::ignore_invalid_partition_id_rowset_num) { LOG(FATAL) << fmt::format( - "roswet partition id eq 0 is {} bigger than config {}, be exit, plz check be.INFO", + "rowset partition id eq 0 is {} bigger than config {}, be exit, plz check be.INFO", rowset_partition_id_eq_0_num, config::ignore_invalid_partition_id_rowset_num); exit(-1); } diff --git a/fe/fe-core/src/main/java/org/apache/doris/common/MarkedCountDownLatch.java b/fe/fe-core/src/main/java/org/apache/doris/common/MarkedCountDownLatch.java index e1431c4d729..5c3201e2b80 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/common/MarkedCountDownLatch.java +++ b/fe/fe-core/src/main/java/org/apache/doris/common/MarkedCountDownLatch.java @@ -28,11 +28,13 @@ import java.util.concurrent.CountDownLatch; public class MarkedCountDownLatch<K, V> extends CountDownLatch { private Multimap<K, V> marks; + private Multimap<K, V> failedMarks; private Status st = Status.OK; public MarkedCountDownLatch(int count) { super(count); marks = HashMultimap.create(); + failedMarks = HashMultimap.create(); } public synchronized void addMark(K key, V value) { @@ -54,7 +56,13 @@ public class MarkedCountDownLatch<K, V> extends CountDownLatch { st = status; } - if (marks.remove(key, value)) { + // Since marks are used to determine whether a task is completed, we should not remove + // a mark if the task has failed rather than finished. To maintain the idempotency of + // this method, we store failed marks in a separate map. + // + // Search `getLeftMarks` for details. + if (!failedMarks.containsEntry(key, value)) { + failedMarks.put(key, value); super.countDown(); return true; } diff --git a/fe/fe-core/src/main/java/org/apache/doris/master/MasterImpl.java b/fe/fe-core/src/main/java/org/apache/doris/master/MasterImpl.java index 4010a9b564d..b0b5a9bde37 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/master/MasterImpl.java +++ b/fe/fe-core/src/main/java/org/apache/doris/master/MasterImpl.java @@ -658,7 +658,7 @@ public class MasterImpl { } AlterInvertedIndexTask alterInvertedIndexTask = (AlterInvertedIndexTask) task; - LOG.info("beigin finish AlterInvertedIndexTask: {}, tablet: {}, toString: {}", + LOG.info("begin finish AlterInvertedIndexTask: {}, tablet: {}, toString: {}", alterInvertedIndexTask.getSignature(), alterInvertedIndexTask.getTabletId(), alterInvertedIndexTask.toString()); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org