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-unsubscr...@doris.apache.org 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