CalvinConfluent commented on code in PR #14312:
URL: https://github.com/apache/kafka/pull/14312#discussion_r1357250930
##########
metadata/src/main/java/org/apache/kafka/controller/ReplicationControlManager.java:
##########
@@ -1994,6 +2014,24 @@ private void
listReassigningTopic(ListPartitionReassignmentsResponseData respons
setReplicas(Replicas.toList(partition.replicas)));
}
+ // Make it public to be visible in test.
+ public Integer getTopicEffectiveMinIsr(String topicName) {
+ Integer currentMinIsr =
Integer.parseInt(configurationControl.getTopicConfigs(topicName)
+ .getOrDefault(MIN_IN_SYNC_REPLICAS_CONFIG,
String.valueOf(defaultMinInSyncIsr)));
+ Integer replicationFactor = (int) defaultReplicationFactor;
+ try {
+ Uuid topicId = topicsByName.get(topicName);
+ replicationFactor =
topics.get(topicId).parts.get(0).replicas.length;
+ } catch (Exception e) {
+ log.debug("Can't find the replication factor for topic: " +
topicName);
+ }
+ return Math.min(currentMinIsr, replicationFactor);
+ }
+
+ private short partitionRecordVersion(boolean isElrAllowed) {
Review Comment:
Removed, using the MV to determine the record version.
Even if the ELR static config is disabled, the partition records should be
able to use the latest version in order not to block future features.
--
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]