Skip to content
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

Implemented INCREMENTAL_ALTER_CONFIGS api #939

Merged

Conversation

mmaslankaprv
Copy link
Member

Cover letter

As described in KIP-339 an IncrementalAlterConfigs API provides a way to interact with single property of given configuration resource instead of overriding them all as older AlterConfigs API.

Fixes issues: [#935]

Release notes

  • Support for changing topic properties via IncrementalAlterConfigs

This change will provide users way to setup Redpanda topic configurations with standard kafka-configs.sh tool coming from Kafka.

`ALTER_CONFIGS` and `INCREMENTAL_ALTER_CONFIGS` Kafka APIs have almost
identical handler logic. Moved `ALTER_CONFIGS` handler logic to utils
file, in order to use already existing implementation in both
cases. All functions were replaced with function templates as request
and responses types are different for both APIs yet they are very
similar.

Signed-off-by: Michal Maslanka <michal@vectorized.io>
Signed-off-by: Michal Maslanka <michal@vectorized.io>
Added handling of incremental alter configuration Kafka APIs.
In contrast to existing alter config API the incremental version allow
user to change only subset of available configuration resources.
Previous API i.e. `ALTER_CONFIGS` cause all properties to be overridden
by request values. To use old alter configs API client have to first
describe topic then update single value in topic properties map and
request update.

Signed-off-by: Michal Maslanka <michal@vectorized.io>
Signed-off-by: Michal Maslanka <michal@vectorized.io>
Copy link
Member

@dotnwat dotnwat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm.

what's the plan for testing this? I see there are some tests, but with all the lexical casting and other casts and weird inputs from clients it seems like we sort of need a little fuzz testing for alter/incremental_alter configs to be the safe side.

@mmaslankaprv
Copy link
Member Author

lgtm.

what's the plan for testing this? I see there are some tests, but with all the lexical casting and other casts and weird inputs from clients it seems like we sort of need a little fuzz testing for alter/incremental_alter configs to be the safe side.

I am writing ducktape tests for this.

@mmaslankaprv mmaslankaprv merged commit 821e36b into redpanda-data:dev Mar 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants