levy5307 commented on a change in pull request #8146:
URL: https://github.com/apache/incubator-doris/pull/8146#discussion_r818279779
##########
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) {
+ minVersionCount = replica.getVersionCount();
+ }
+ }
+ final long finalMinVersionCount = minVersionCount;
+ return allQueryableReplica.stream().filter(replica ->
replica.getVersionCount() == -1 ||
+ replica.getVersionCount() <
Config.min_version_count_indicate_replica_compaction_too_slow ||
+ replica.getVersionCount() < finalMinVersionCount *
3)
Review comment:
What does the const var 3 mean?
Could you add a comment for it?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]