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


##########
metadata/src/main/java/org/apache/kafka/controller/QuorumController.java:
##########
@@ -2360,4 +2363,9 @@ void setNewNextWriteOffset(long newNextWriteOffset) {
     void handleUncleanBrokerShutdown(int brokerId, List<ApiMessageAndVersion> 
records) {
         replicationControl.handleBrokerUncleanShutdown(brokerId, records);
     }
+
+    void maybeTriggerMinIsrConfigUpdate(Optional<String> topicName) throws 
InterruptedException, ExecutionException {
+        appendWriteEvent("partitionUpdateForMinIsrChange", 
OptionalLong.empty(),
+            () -> 
replicationControl.getPartitionElrUpdatesForConfigChanges(topicName)).get();
+    }

Review Comment:
   hmm, I think a better way to think about it is that we want to append the 
min ISR config update atomically with the partition change records. Appending 
the partition change records once the config change is replayed is difficult to 
reason about and possibly incorrect. Thinking a bit more about it, triggering a 
write event from the `replay()` for the config change record means that every 
time we reload the metadata log, we would replay the config change record and 
generate new partition change records.
   
   Perhaps one example to look at is 
`ReplicationControlManager.handleBrokerFenced`. When a broker is fenced, we 
generate a broker registration change record along with the leaderAndIsr 
partition change records. I assume we want to follow a similar model with the 
topic configuration change events.



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