[fix](catalog) remove backend in black list from candidate backends for external table (#38984)
When select backends for external table's query, skip the backends in black list
This commit is contained in:
@ -17,6 +17,8 @@
|
||||
|
||||
package org.apache.doris.system;
|
||||
|
||||
import org.apache.doris.common.Config;
|
||||
import org.apache.doris.qe.SimpleScheduler;
|
||||
import org.apache.doris.resource.Tag;
|
||||
import org.apache.doris.thrift.TStorageMedium;
|
||||
|
||||
@ -209,6 +211,10 @@ public class BeSelectionPolicy {
|
||||
} else {
|
||||
candidates.addAll(filterBackends);
|
||||
}
|
||||
// filter out backends in black list
|
||||
if (!Config.disable_backend_black_list) {
|
||||
candidates = candidates.stream().filter(b -> SimpleScheduler.isAvailable(b)).collect(Collectors.toList());
|
||||
}
|
||||
Collections.shuffle(candidates);
|
||||
return candidates;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user