dielhennr commented on a change in pull request #9101:
URL: https://github.com/apache/kafka/pull/9101#discussion_r465329379
##########
File path: core/src/main/scala/kafka/server/DynamicConfig.scala
##########
@@ -103,12 +122,25 @@ object DynamicConfig {
.define(ProducerByteRateOverrideProp, LONG, DefaultProducerOverride,
MEDIUM, ProducerOverrideDoc)
.define(ConsumerByteRateOverrideProp, LONG, DefaultConsumerOverride,
MEDIUM, ConsumerOverrideDoc)
.define(RequestPercentageOverrideProp, DOUBLE, DefaultRequestOverride,
MEDIUM, RequestOverrideDoc)
+ .define(AcksOverrideProp, STRING, DefaultAcksOverride,
ConfigDef.ValidString.in("all", "-1", "0", "1"), HIGH, AcksOverrideDoc)
+ .define(
+ SessionTimeoutOverrideProp,
+ INT,
+ DefaultSessionTimeoutOverride,
+ ConfigDef.Range.between(Defaults.GroupMinSessionTimeoutMs,
Defaults.GroupMaxSessionTimeoutMs),
+ HIGH,
+ SessionTimeoutOverrideDoc)
+ .define(HeartbeatIntervalOverrideProp, INT,
DefaultHeartbeatIntervalOverride, HIGH, HeartbeatIntervalOverrideDoc)
Review comment:
This prevents key-value pairs that the broker knows are invalid from
being persisted to zookeeper e.g. acks=2. The group coordinator also requires
that a group members session timeout is in between GroupMinSessionTimeoutMs and
GroupMaxSessionTimeoutMs, so the broker can also prevent invalid session
timeouts from being persisted to zk.
The motivation behind doing validation on the broker and even more
validation on the client is that some clients could reject the dynamic configs
because of conflicts with user-provided configs while other clients accept the
dynamic config. As long as the broker sanity-checks them before persisting to
zk this is possible. If sanity checking is not done, and for example acks=2 is
persisted, it is invalid for all clients not a subset of 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.
For queries about this service, please contact Infrastructure at:
[email protected]