MINOR: Use LogConfig.validate instead of validateValues in KafkaMetadataLog#13051
MINOR: Use LogConfig.validate instead of validateValues in KafkaMetadataLog#13051ijuma merged 1 commit intoapache:trunkfrom
LogConfig.validate instead of validateValues in KafkaMetadataLog#13051Conversation
…adataLog` The former may fail or return misleading results if the properties don't include defaults.
KafkaMetadataLogLogConfig.validate instead of validateValues in KafkaMetadataLog
jsancio
left a comment
There was a problem hiding this comment.
LGTM. Thanks for the fix. I think we never saw an issue because KRaft was not using any of the properties validated in LogConfig.validateValues.
|
@jsancio Yes, right - this preempts a potential issue if KRaft starts using some of the other properties. This fix also means we don't need to add a workaround in the PR that moves LogConfig to Java (an NPE happens without a workaround since the semantics of unboxing are different for Java). |
|
JDK 17 build passed, the other failures are unrelated:
|
…MetadataLog` (apache#13051) `LogConfig.validateValues` may fail or incorrectly succeed if the properties don't include defaults. During the conversion of `LogConfig` to Java (apache#13049), it became clear that the `asInstanceOf[Long]` calls in `LogConfig.validateValues` were converting `null` to `0` when this method was invoked from `KafkaMetadataLog`. This means that it would be possible for it to validate successfully in cases where it should not. Reviewers: José Armando García Sancio <jsancio@apache.org>
LogConfig.validateValuesmay fail or incorrectly succeed if the properties don't include defaults.During the conversion of
LogConfigto Java (#13049), it became clear that theasInstanceOf[Long]calls in
LogConfig.validateValueswere convertingnullto0when this method was invokedfrom
KafkaMetadataLog. This means that it would be possible for it to validate successfullyin cases where it should not.
Committer Checklist (excluded from commit message)