This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-2.1 by this push:
     new f2cf8b7d6fb [Fix](InternalSchema) Compute nodes should not be used for 
Internal schema three replica (#36130) (#37961)
f2cf8b7d6fb is described below

commit f2cf8b7d6fb61950cde7431ef305a41815502ef3
Author: Mingyu Chen <[email protected]>
AuthorDate: Wed Jul 17 13:45:32 2024 +0800

    [Fix](InternalSchema) Compute nodes should not be used for Internal schema 
three replica (#36130) (#37961)
    
    bp #36130
    
    Co-authored-by: HB <[email protected]>
    Co-authored-by: camby <[email protected]>
---
 .../main/java/org/apache/doris/catalog/InternalSchemaInitializer.java | 2 +-
 .../src/main/java/org/apache/doris/system/SystemInfoService.java      | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/catalog/InternalSchemaInitializer.java
 
b/fe/fe-core/src/main/java/org/apache/doris/catalog/InternalSchemaInitializer.java
index 0e12367210d..6e4e9a96f45 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/catalog/InternalSchemaInitializer.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/catalog/InternalSchemaInitializer.java
@@ -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();
             }
diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/system/SystemInfoService.java 
b/fe/fe-core/src/main/java/org/apache/doris/system/SystemInfoService.java
index 0dc314240b3..56ef540a249 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/system/SystemInfoService.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/system/SystemInfoService.java
@@ -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());


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to