Skip to content

Conversation

@mumrah
Copy link
Member

@mumrah mumrah commented Jul 1, 2022

The existing AlterConfigPolicy behavior in ZK clusters is to only validate configs that have been included into the IncrementalAlterConfigs request. While this could be considered a bug, we should make KRaft have the same behavior as ZK with regards to pluggable interfaces like this.

This patch changes the behavior of ConfigurationControlManager to only pass configs to the AlterConfigPolicy that were included in the request. The full set of configs is still passed through the ConfigurationValidator defined by the controller, but only altered configs are passed down to the AlterConfigPolicy.

@mumrah mumrah requested a review from hachikuji July 1, 2022 18:16
@hachikuji
Copy link
Contributor

@mumrah Thanks for the patch. Are there any integration tests we can add to AdminClientWithPoliciesIntegrationTest? It would be nice to verify consistent behavior between kraft and zk.

@mumrah
Copy link
Member Author

mumrah commented Jul 13, 2022

@hachikuji I added coverage for the new behavior in the test you mentioned. The test will first set a regular broker config, and later verify that it isn't passed to the policy when we're modifying other configs for the broker resource.

Copy link
Contributor

@hachikuji hachikuji left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM

@mumrah mumrah merged commit c020c94 into apache:trunk Jul 15, 2022
mumrah added a commit that referenced this pull request Jul 26, 2022
Only pass configs from the request to the AlterConfigPolicy. This changes the KRaft usage of the AlterConfigPolicy to match the usage in ZK mode.

Reviewers: Jason Gustafson <jason@confluent.io>
cmccabe pushed a commit that referenced this pull request Sep 1, 2022
…12578)

#12374 adjusted the invocation of the alter configs policy check in KRaft to match the behavior in ZooKeeper, which is to only provide the configs that were explicitly sent in the request. While the code was correct for the incremental alter configs case, the code actually included the implicit deletions for the legacy/non-incremental alter configs case, and those implicit deletions are not included in the ZooKeeper-based invocation. This patch adds a test to check for this and adjusts ConfigurationControlManager code so that the test passes -- the adjusted test is confirmed to fail locally otherwise. We also add a log statement to emit any unexpected stack traces in the alter config code path.

Reviewers: José Armando García Sancio <jsancio@gmail.com>, Colin P. McCabe <cmccabe@apache.org>
cmccabe pushed a commit that referenced this pull request Sep 1, 2022
…12578)

#12374 adjusted the invocation of the alter configs policy check in KRaft to match the behavior in ZooKeeper, which is to only provide the configs that were explicitly sent in the request. While the code was correct for the incremental alter configs case, the code actually included the implicit deletions for the legacy/non-incremental alter configs case, and those implicit deletions are not included in the ZooKeeper-based invocation. This patch adds a test to check for this and adjusts ConfigurationControlManager code so that the test passes -- the adjusted test is confirmed to fail locally otherwise. We also add a log statement to emit any unexpected stack traces in the alter config code path.

Reviewers: José Armando García Sancio <jsancio@gmail.com>, Colin P. McCabe <cmccabe@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants