Fix GroupRebalanceConfig to take in rack id as an optional arg #3752
Open
Aditya Addepalli (aaddepalli7) wants to merge 1 commit into
Open
Fix GroupRebalanceConfig to take in rack id as an optional arg #3752Aditya Addepalli (aaddepalli7) wants to merge 1 commit into
Aditya Addepalli (aaddepalli7) wants to merge 1 commit into
Conversation
|
🎉 All Contributor License Agreements have been signed. Ready to merge. |
There was a problem hiding this comment.
Pull Request Overview
This PR updates the SchemaRegistryCoordinator to pass the new optional rack ID argument in line with the Kafka GroupRebalanceConfig API change.
- Adds a second
Optional.empty()to the constructor call to fill the new rack ID parameter. - Aligns the coordinator instantiation with the updated Kafka client config signature.
Comments suppressed due to low confidence (1)
core/src/main/java/io/confluent/kafka/schemaregistry/leaderelector/kafka/SchemaRegistryCoordinator.java:84
- There are no unit tests covering the new rack ID parameter behavior. Consider adding tests to ensure the coordinator handles both present and absent rack IDs correctly.
Optional.empty(),
Comment on lines
83
to
+84
| Optional.empty(), | ||
| Optional.empty(), |
There was a problem hiding this comment.
[nitpick] The duplicated Optional.empty() calls are ambiguous. Consider using named constants or inline comments to clarify which Optional.empty() corresponds to the group instance ID and which to the new rack ID parameter.
Suggested change
| Optional.empty(), | |
| Optional.empty(), | |
| GROUP_INSTANCE_ID_EMPTY, | |
| RACK_ID_EMPTY, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AK changed the definition of this config - https://issues.apache.org/jira/browse/KAFKA-17747
https://github.com/apache/kafka/blame/trunk/clients/src/main/java/org/apache/kafka/clients/GroupRebalanceConfig.java#L74