ahuang98 commented on code in PR #21053:
URL: https://github.com/apache/kafka/pull/21053#discussion_r2677564871
##########
metadata/src/main/java/org/apache/kafka/image/ConfigurationDelta.java:
##########
@@ -56,19 +70,28 @@ public void deleteAll() {
}
public ConfigurationImage apply() {
+ Set<String> whitelist = VALID_CONFIGS_REF.get();
Review Comment:
there might be a better place to do this validation (you might want to take
a look at FeaturesDelta and see how we handle filtering there for an old bug)
another good point from @jsancio is that all XXXDelta's apply methods are
doing are applying deltas ontop of a base image to produce a new image. that
new image then becomes the base image for the next delta to be applied ontop
of. given that we always start with an empty base image, it follows that we
only need to validate the delta (referenced to as `changes` in this code) to
ensure every image that is produced as a result is valid
##########
metadata/src/main/java/org/apache/kafka/image/ConfigurationDelta.java:
##########
@@ -56,19 +70,28 @@ public void deleteAll() {
}
public ConfigurationImage apply() {
+ Set<String> whitelist = VALID_CONFIGS_REF.get();
Review Comment:
there might be a better place to do this validation (you might want to take
a look at FeaturesDelta and see how we handle filtering there for an old bug)
another good point from @jsancio is that all XXXDelta's apply methods are
doing are applying deltas ontop of a base image to produce a new image. that
new image then becomes the base image for the next delta to be applied ontop
of. given that we always start with an empty base image, it follows that we
only need to validate the deltas (referenced to as `changes` in this code) to
ensure every image that is produced as a result is valid
--
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]