muralibasani commented on code in PR #24005:
URL: https://github.com/apache/kafka/pull/24005#discussion_r4568026101


##########
tools/src/main/java/org/apache/kafka/tools/TopicCommand.java:
##########
@@ -311,8 +311,10 @@ static class PartitionDescription {
             this.reassignment = reassignment;
         }
 
+        // Effective min ISR, capped at the replica count like 
Partition#effectiveMinIsr on the broker.

Review Comment:
   Thanks @chia7712
   
   Pushed changes.
   
   New helper - MinInSyncReplicas.effectiveMinIsr (shared by Partition, 
ReplicationControlManager and TopicCommand)
   
   As the cap is unconditional in the broker from 3.7, I have dropped the 
describeFeatures check, so the tool always uses the helper. 
   
   Tested with single-node apache/kafka 3.7.0, 3.9.0, 4.0.0 and 4.4.0, with an 
rf=1, min.insync.replicas=2 topic. On all four, acks=all writes succeed. The 
current CLI lists the partition under --under-min-isr-partitions, and the fixed 
CLI lists it only under --at-min-isr-partitions.
   
   @AndrewJSchofield btw, in the second commit I added a supportedFeatures() 
check (brokerCapsMinIsr) which didn't result correctly for 3.7 and 3.9 brokers 
(cli result differs with broker result), but only good for 4.0+. Hence dropped 
this check. 



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

Reply via email to