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

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


The following commit(s) were added to refs/heads/branch-4.1 by this push:
     new c6bb469105d branch-4.1: [fix](fe) Fix int overflow in BeIdComparator 
causing stream load failure #63565 (#64053)
c6bb469105d is described below

commit c6bb469105d6563024cca488c0ffb8056dc2c431
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Thu Jun 4 09:52:29 2026 +0800

    branch-4.1: [fix](fe) Fix int overflow in BeIdComparator causing stream 
load failure #63565 (#64053)
    
    Cherry-picked from #63565
    
    Co-authored-by: rich <[email protected]>
---
 .../main/java/org/apache/doris/cloud/system/CloudSystemInfoService.java | 2 +-
 fe/fe-core/src/main/java/org/apache/doris/system/SystemInfoService.java | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/cloud/system/CloudSystemInfoService.java
 
b/fe/fe-core/src/main/java/org/apache/doris/cloud/system/CloudSystemInfoService.java
index 5d62986cff7..182aa9676a3 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/cloud/system/CloudSystemInfoService.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/cloud/system/CloudSystemInfoService.java
@@ -1072,7 +1072,7 @@ public class CloudSystemInfoService extends 
SystemInfoService {
                         .filter(i -> 
i.getTagMap().containsKey(Tag.CLOUD_CLUSTER_NAME))
                         .collect(Collectors.toList());
                 // The larger bakendId the later it was added, the order 
matters
-                toAdd.sort((x, y) -> (int) (x.getId() - y.getId()));
+                toAdd.sort((x, y) -> Long.compare(x.getId(), y.getId()));
                 updateCloudClusterMapNoLock(toAdd, new ArrayList<>());
             }
 
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 346b4a0c2ac..0076429813d 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
@@ -479,7 +479,7 @@ public class SystemInfoService {
 
     class BeIdComparator implements Comparator<Backend> {
         public int compare(Backend a, Backend b) {
-            return (int) (a.getId() - b.getId());
+            return Long.compare(a.getId(), b.getId());
         }
     }
 


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

Reply via email to