deardeng commented on code in PR #41076: URL: https://github.com/apache/doris/pull/41076#discussion_r1770755483
########## fe/fe-core/src/main/java/org/apache/doris/clone/TabletChecker.java: ########## @@ -404,7 +404,7 @@ private LoopControlStatus handlePartitionTablet(Database db, OlapTable tbl, Part tabletCtx.setIsUniqKeyMergeOnWrite(isUniqKeyMergeOnWrite); AddResult res = tabletScheduler.addTablet(tabletCtx, false /* not force */); - if (res == AddResult.LIMIT_EXCEED || res == AddResult.DISABLED) { + if (res == AddResult.DISABLED) { Review Comment: ditto ########## fe/fe-core/src/main/java/org/apache/doris/clone/ColocateTableCheckerAndBalancer.java: ########## @@ -561,14 +561,14 @@ private void matchGroups() { tabletCtx.setIsUniqKeyMergeOnWrite(isUniqKeyMergeOnWrite); AddResult res = tabletScheduler.addTablet(tabletCtx, false /* not force */); - if (res == AddResult.LIMIT_EXCEED || res == AddResult.DISABLED) { + if (res == AddResult.DISABLED) { Review Comment: LIMIT_EXCEED 状态没处理,看需要加log不 ########## fe/fe-core/src/main/java/org/apache/doris/clone/TabletScheduler.java: ########## @@ -277,9 +277,15 @@ public synchronized AddResult addTablet(TabletSchedCtx tablet, boolean force) { // if this is not a force add, // and number of scheduling tablets exceed the limit, // refuse to add. - if (!force && (pendingTablets.size() > Config.max_scheduling_tablets - || runningTablets.size() > Config.max_scheduling_tablets)) { - return AddResult.LIMIT_EXCEED; + if (!force && (pendingTablets.size() >= Config.max_scheduling_tablets + || runningTablets.size() >= Config.max_scheduling_tablets)) { + TabletSchedCtx lowestPriorityTablet = pendingTablets.peekLast(); + if (lowestPriorityTablet == null || lowestPriorityTablet.compareTo(tablet) <= 0) { Review Comment: add comment -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org