yujun777 commented on code in PR #41076:
URL: https://github.com/apache/doris/pull/41076#discussion_r1770833526
##########
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:
added
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]