This is an automated email from the ASF dual-hosted git repository. kxiao pushed a commit to branch branch-2.0 in repository https://gitbox.apache.org/repos/asf/doris.git
commit 38481a4f248342d0482f20ecff6fa5954772b942 Author: yujun <yu.jun.re...@gmail.com> AuthorDate: Fri Jul 21 13:27:40 2023 +0800 [fix](tablet clone) sched wait slot if has be path (#22015) --- .../src/main/java/org/apache/doris/clone/TabletSchedCtx.java | 2 +- .../src/main/java/org/apache/doris/clone/TabletScheduler.java | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/clone/TabletSchedCtx.java b/fe/fe-core/src/main/java/org/apache/doris/clone/TabletSchedCtx.java index 286b70f65e..a3734dc9e0 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/clone/TabletSchedCtx.java +++ b/fe/fe-core/src/main/java/org/apache/doris/clone/TabletSchedCtx.java @@ -103,7 +103,7 @@ public class TabletSchedCtx implements Comparable<TabletSchedCtx> { */ private static final int RUNNING_FAILED_COUNTER_THRESHOLD = 3; - public static final int FINISHED_COUNTER_THRESHOLD = 3; + public static final int FINISHED_COUNTER_THRESHOLD = 4; private static VersionCountComparator VERSION_COUNTER_COMPARATOR = new VersionCountComparator(); diff --git a/fe/fe-core/src/main/java/org/apache/doris/clone/TabletScheduler.java b/fe/fe-core/src/main/java/org/apache/doris/clone/TabletScheduler.java index aaaac36a24..ab50bb095b 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/clone/TabletScheduler.java +++ b/fe/fe-core/src/main/java/org/apache/doris/clone/TabletScheduler.java @@ -1357,6 +1357,8 @@ public class TabletScheduler extends MasterDaemon { return rootPathLoadStatistic; } + boolean hasBePath = false; + // no root path with specified media type is found, get arbitrary one. for (RootPathLoadStatistic rootPathLoadStatistic : allFitPaths) { PathSlot slot = backendsWorkingSlots.get(rootPathLoadStatistic.getBeId()); @@ -1367,6 +1369,7 @@ public class TabletScheduler extends MasterDaemon { continue; } + hasBePath = true; long pathHash = slot.takeSlot(rootPathLoadStatistic.getPathHash()); if (pathHash == -1) { LOG.debug("backend {}'s path {}'s slot is full, skip. tablet: {}", @@ -1377,7 +1380,13 @@ public class TabletScheduler extends MasterDaemon { return rootPathLoadStatistic; } - throw new SchedException(Status.UNRECOVERABLE, "unable to find dest path which can be fit in"); + if (hasBePath) { + throw new SchedException(Status.SCHEDULE_FAILED, SubCode.WAITING_SLOT, + "unable to find dest path which can be fit in"); + } else { + throw new SchedException(Status.UNRECOVERABLE, + "unable to find dest path which can be fit in"); + } } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org