[Fix](InternalSchema) Compute nodes should not be used for Internal schema three replica (#36130) (#37961)
bp #36130 Co-authored-by: HB <137497191@qq.com> Co-authored-by: camby <104178625@qq.com>
This commit is contained in:
@ -102,7 +102,7 @@ public class InternalSchemaInitializer extends Thread {
|
||||
return;
|
||||
}
|
||||
while (true) {
|
||||
int backendNum = Env.getCurrentSystemInfo().getBackendNumFromDiffHosts(true);
|
||||
int backendNum = Env.getCurrentSystemInfo().getStorageBackendNumFromDiffHosts(true);
|
||||
if (FeConstants.runningUnitTest) {
|
||||
backendNum = Env.getCurrentSystemInfo().getAllBackendIds().size();
|
||||
}
|
||||
|
||||
@ -417,11 +417,11 @@ public class SystemInfoService {
|
||||
}
|
||||
|
||||
// return num of backends that from different hosts
|
||||
public int getBackendNumFromDiffHosts(boolean aliveOnly) {
|
||||
public int getStorageBackendNumFromDiffHosts(boolean aliveOnly) {
|
||||
Set<String> hosts = Sets.newHashSet();
|
||||
ImmutableMap<Long, Backend> idToBackend = idToBackendRef;
|
||||
for (Backend backend : idToBackend.values()) {
|
||||
if (aliveOnly && !backend.isAlive()) {
|
||||
if ((aliveOnly && !backend.isAlive()) || backend.isComputeNode()) {
|
||||
continue;
|
||||
}
|
||||
hosts.add(backend.getHost());
|
||||
|
||||
Reference in New Issue
Block a user