[ 
https://issues.apache.org/jira/browse/KAFKA-9644?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17050687#comment-17050687
 ] 

ASF GitHub Bot commented on KAFKA-9644:
---------------------------------------

steverod commented on pull request #8216: [KAFKA-9644] Non-existent configs in 
incrementalAlterConfigs APPEND/SUBTRACT
URL: https://github.com/apache/kafka/pull/8216
 
 
   Problem
   ----
   The `incrementalAlterConfigs` API supports OpType.APPEND and OpType.SUBTRACT 
for configuration properties of LIST type. If an APPEND or SUBTRACT OpType is 
submitted for a config property which currently has no value, then the 
operation fails with a NullPointerException on the broker side (conveyed as an 
"unknown server error" to the client).
   
   This is because the alter code does a `getProperty` of the existing 
configuration value
   with no concern as to whether or not the property actually exists.
   
   This change handles the case of existing null properties. 
   
   Testing
   -----
   This change includes 2 test cases in the unit test that demonstrate the 
issue for OpType.SUBTRACT and OpType.APPEND. 
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   
 
----------------------------------------------------------------
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:
us...@infra.apache.org


> incrementalAlterConfigs OpType.APPEND on unset property fails with 
> NullPointerException
> ---------------------------------------------------------------------------------------
>
>                 Key: KAFKA-9644
>                 URL: https://issues.apache.org/jira/browse/KAFKA-9644
>             Project: Kafka
>          Issue Type: Bug
>          Components: admin
>    Affects Versions: 2.3.0
>            Reporter: Steve Rodrigues
>            Priority: Minor
>         Attachments: incrementalAlterTest.patch, 
> kafka.api.PlaintextAdminIntegrationTest.testValidIncrementalAlterConfigs.test.stdout
>
>
> Running incrementalAlterConfigs with an OpType.APPEND when the config 
> property doesn't already exist fails with a NullPointerException on the 
> broker.
> Attached is a patch to the PlaintextAdminIntegrationTest demonstrating this 
> failure and the test output showing the NPE.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to