chia7712 commented on code in PR #20334:
URL: https://github.com/apache/kafka/pull/20334#discussion_r2751891419
##########
docs/upgrade.html:
##########
@@ -113,6 +113,35 @@ <h5><a id="upgrade_420_notable"
href="#upgrade_420_notable">Notable changes in 4
<li>
The <code>num.replica.fetchers</code> config has a new lower bound of
1.
</li>
+ <li>
+ Improvements have been made to the validation rules and default values
of LIST-type configurations
+ (<a href="https://cwiki.apache.org/confluence/x/HArXF">KIP-1161</a>).
+ <ul>
+ <li>
+ LIST-type configurations now enforce stricter validation:
+ <ul>
+ <li>Null values are no longer accepted for most LIST-type
configurations, except those that explicitly
+ allow a null default value or where a null value has a
well-defined semantic meaning.</li>
+ <li>Duplicate entries within the same list are no longer
permitted.</li>
Review Comment:
My point focuses on the behavior when encountering invalid configs: does the
broker crash or just log an error?
**Case 0 (Invalid configs in Snapshot):**
1. `readDynamicBrokerConfigsFromSnapshot` reads the invalid configs, and
`KafkaConfig` is updated with them.
2. `LogManager` initialization fails due to the invalid config.
3. Result: Broker crashes (Fail-fast).
**Case 1 (Invalid configs in Metadata Log Tail):**
1. `readDynamicBrokerConfigsFromSnapshot` does NOT read the invalid configs
(snapshot is clean).
2. `LogManager` initialization succeeds.
3. `DynamicBrokerConfig` processes the metadata image, reads the invalid
configs, and updates `KafkaConfig`.
4. `DynamicLogConfig` attempts to apply the new invalid configs -> Fails,
but the exception is caught and logged.
5. Result: Broker does NOT crash; the error is ignored.
Currently, Case 0 causes a crash, but Case 1 does not. I want to ensure
consistency so that invalid configs in the log tail also trigger a fail-fast
during startup.
--
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]