CalvinConfluent commented on code in PR #15702:
URL: https://github.com/apache/kafka/pull/15702#discussion_r1569214320


##########
metadata/src/main/java/org/apache/kafka/controller/ReplicationControlManager.java:
##########
@@ -2117,6 +2117,20 @@ ListPartitionReassignmentsResponseData 
listPartitionReassignments(
         return response;
     }
 
+    ControllerResult<Void> 
getPartitionElrUpdatesForConfigChanges(Optional<String> topicName) {
+        if (!isElrEnabled()) return 
ControllerResult.of(Collections.emptyList(), null);
+
+        List<ApiMessageAndVersion> records = new ArrayList<>();
+        if (topicName.isPresent()) {
+            generateLeaderAndIsrUpdates("handleMinIsrUpdate", NO_LEADER, 
NO_LEADER, NO_LEADER, records,
+                
brokersToElrs.partitionsWithElr(topicsByName.get(topicName.get())));
+        } else {
+            generateLeaderAndIsrUpdates("handleMinIsrUpdate", NO_LEADER, 
NO_LEADER, NO_LEADER, records,
+                brokersToElrs.partitionsWithElr());
+        }

Review Comment:
   Yes, we should only update the partition(remove the ELRs) when min isr 
decreases. Because if the min isr decreases, the partition can advance the HWM 
with fewer ISR members, this can invalidate the ELR as a potential leader.
   Sure, I can add them.



-- 
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: jira-unsubscr...@kafka.apache.org

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

Reply via email to