-
Notifications
You must be signed in to change notification settings - Fork 14.8k
KAFKA-19931 inconsistency in handling the null config value #21005
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Conversation
chia7712
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@m1a2st could you take a look at the failed test testInvalidIncrementalAlterConfigsResources?
junrao
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@m1a2st : Thanks for the PR. Left a comment.
| altersByName.put(config.name, new util.AbstractMap.SimpleEntry[AlterConfigOp.OpType, String]( | ||
| AlterConfigOp.OpType.forId(config.configOperation), config.value)) | ||
| if (!nullUpdates.isEmpty) { | ||
| throw new InvalidRequestException("Null value not supported for : " + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be better to just set the error response here instead of throwing?
| } catch { | ||
| case t: Throwable => ApiError.fromThrowable(t) | ||
| try { | ||
| val nullUpdates = new util.ArrayList[String]() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, there are quite a few pre-processing checks in ConfigAdminManager. The doc says the following. Could we restructure the code between ConfigAdminManager and ControllerApis to (1) avoid duplicates logic in verification (2) prevent missing verification in one of the two places in the future?
// BROKER_LOGGER requests always go to a specific, constant broker or controller node.
//
// BROKER resource changes for a specific (non-default) resource go to either that specific
// node (if using bootstrap.servers), or directly to the active controller (if using
// bootstrap.controllers)
//
// All other requests go to the least loaded broker (if using bootstrap.servers) or the
// active controller (if using bootstrap.controllers)
FYI: #20960