morningman commented on a change in pull request #4095:
URL: https://github.com/apache/incubator-doris/pull/4095#discussion_r455074399



##########
File path: 
fe/src/main/java/org/apache/doris/common/proc/IncompleteTabletsProcNode.java
##########
@@ -29,20 +29,24 @@
 
 public class IncompleteTabletsProcNode implements ProcNodeInterface {
     public static final ImmutableList<String> TITLE_NAMES = new 
ImmutableList.Builder<String>()
-            
.add("UnhealthyTablets").add("InconsistentTablets").add("CloningTablets")
+            
.add("UnhealthyTablets").add("InconsistentTablets").add("CloningTablets").add("LostTablets")
             .build();
+
     private static final Joiner JOINER = Joiner.on(",");
 
     Collection<Long> unhealthyTabletIds;
     Collection<Long> inconsistentTabletIds;
+    Collection<Long> noavlreplicaTabletIds;
     Collection<Long> cloningTabletIds;
 
     public IncompleteTabletsProcNode(Collection<Long> unhealthyTabletIds,
                                      Collection<Long> inconsistentTabletIds,
-                                     Collection<Long> cloningTabletIds) {
+                                     Collection<Long> cloningTabletIds,
+                                     Collection<Long> noavlreplicaTabletIds) {
         this.unhealthyTabletIds = unhealthyTabletIds;
         this.inconsistentTabletIds = inconsistentTabletIds;
         this.cloningTabletIds = cloningTabletIds;
+        this.noavlreplicaTabletIds = noavlreplicaTabletIds;

Review comment:
       ```suggestion
           this.noAvlreplicaTabletIds = noAvlreplicaTabletIds;
   ```

##########
File path: fe/src/main/java/org/apache/doris/common/proc/StatisticProcDir.java
##########
@@ -145,6 +150,12 @@ public ProcResult fetchResult() throws AnalysisException {
                                     unhealthyTabletIds.put(dbId, 
tablet.getId());
                                 }
 
+                                // find tablet with no available replica;
+                                if (!tablet.hasAvailableReplica(infoService, 
partition.getVisibleVersion(),

Review comment:
       I think we can just add a new enum value in `TabletStatus`, for example, 
`NO_AVAILABLE_REPLICA`, and return it by calling 
`getHealthStatusWithPriority()` above. So that we can save some iteration.
   
   But adding new enum value in `TabletStatus` may affect other code, which is 
uncontrollable. So I suggest to add a new parameter in 
`getHealthStatusWithPriority()`, eg, `getHealthStatusWithPriority(..., bool 
returnNoAvlExplicit)`.
   And if `returnNoAvlExplicit` is true, it return return 
`NO_AVAILABLE_REPLICA` explicit.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to