cmccabe commented on code in PR #12050:
URL: https://github.com/apache/kafka/pull/12050#discussion_r875075852


##########
metadata/src/main/java/org/apache/kafka/image/MetadataDelta.java:
##########
@@ -253,6 +263,14 @@ public void replay(RemoveTopicRecord record) {
 
     public void replay(FeatureLevelRecord record) {
         getOrCreateFeaturesDelta().replay(record);
+        featuresDelta.metadataVersionChange().ifPresent(__ -> {
+            // If any feature flags change, need to trigger components to 
possibly handle the new flags

Review Comment:
   hmm, you forgot AclsDelta here :)
   
   I think we need a separate function to handle changes in `metadataVersion`, 
not just `getOrCreate*Delta`.
   
   After all, changes in `metadataVersion` could have the effect of deleting a 
bunch of stuff (downgrade to version X without the stuff). And this is an 
immediate effect: as soon as the downgrade happens, boom. The data is gone.
   
   Whereas `getOrCreate*Delta` is a no-op if the delta object already exists.



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