You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/03/03 02:09:46 UTC

[GitHub] [incubator-doris] yiguolei commented on a change in pull request #8146: [Enhancement] Support Skipping compaction lower replica where select queryable replica for better scan performance

yiguolei commented on a change in pull request #8146:
URL: https://github.com/apache/incubator-doris/pull/8146#discussion_r818255966



##########
File path: fe/fe-core/src/main/java/org/apache/doris/catalog/Tablet.java
##########
@@ -227,10 +228,25 @@ public void getQueryableReplicas(List<Replica> allQuerableReplica, long visibleV
                 // replica.getSchemaHash() == -1 is for compatibility
                 if (replica.checkVersionCatchUp(visibleVersion, false)
                         && (replica.getSchemaHash() == -1 || replica.getSchemaHash() == schemaHash)) {
-                    allQuerableReplica.add(replica);
+                    allQueryableReplica.add(replica);
                 }
             }
         }
+
+        if (Config.skip_compaction_slower_replica && allQueryableReplica.size() > 1) {
+            long minVersionCount = Long.MAX_VALUE;
+            for (Replica replica : allQueryableReplica) {
+                if (replica.getVersionCount() != -1 && replica.getVersionCount() < minVersionCount) {

Review comment:
       check replica.getVersionCount() > 0 is better. Since the tablet has at least one rowset




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

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



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