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

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


The following commit(s) were added to refs/heads/branch-4.0 by this push:
     new d8460d2dced branch-4.0: [fix](replica) do not select user drop replica 
as possible #54434 (#60509)
d8460d2dced is described below

commit d8460d2dcedfc354a8fbe54b672a5777f1e39e3e
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Thu Feb 5 11:12:19 2026 +0800

    branch-4.0: [fix](replica) do not select user drop replica as possible 
#54434 (#60509)
    
    Cherry-picked from #54434
    
    Co-authored-by: Yongqiang YANG <[email protected]>
---
 fe/fe-core/src/main/java/org/apache/doris/catalog/Tablet.java | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/fe/fe-core/src/main/java/org/apache/doris/catalog/Tablet.java 
b/fe/fe-core/src/main/java/org/apache/doris/catalog/Tablet.java
index 2a1e83d3791..4d68354ad5c 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/catalog/Tablet.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/catalog/Tablet.java
@@ -298,6 +298,7 @@ public class Tablet extends MetaObject {
         List<Replica> deadPathReplica = 
Lists.newArrayListWithCapacity(replicaNum);
         List<Replica> mayMissingVersionReplica = 
Lists.newArrayListWithCapacity(replicaNum);
         List<Replica> notCatchupReplica = 
Lists.newArrayListWithCapacity(replicaNum);
+        List<Replica> userDropReplica = 
Lists.newArrayListWithCapacity(replicaNum);
 
         for (Replica replica : replicas) {
             if (replica.isBad()) {
@@ -307,6 +308,10 @@ public class Tablet extends MetaObject {
                 notCatchupReplica.add(replica);
                 continue;
             }
+            if (replica.isUserDrop()) {
+                userDropReplica.add(replica);
+                continue;
+            }
             if (replica.getLastFailedVersion() > 0) {
                 mayMissingVersionReplica.add(replica);
                 continue;
@@ -330,6 +335,7 @@ public class Tablet extends MetaObject {
         if (allQueryableReplica.isEmpty()) {
             allQueryableReplica = auxiliaryReplica;
         }
+
         if (allQueryableReplica.isEmpty()) {
             allQueryableReplica = deadPathReplica;
         }
@@ -343,6 +349,10 @@ public class Tablet extends MetaObject {
             allQueryableReplica = notCatchupReplica;
         }
 
+        if (allQueryableReplica.isEmpty()) {
+            allQueryableReplica = userDropReplica;
+        }
+
         if (Config.skip_compaction_slower_replica && 
allQueryableReplica.size() > 1) {
             long minVersionCount = Long.MAX_VALUE;
             for (Replica replica : allQueryableReplica) {


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

Reply via email to