-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
KAFKA-18827: Initialize share state, share coordinator impl. [1/N] #18968
Conversation
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.
Thanks for the PR. Just a few small comments to address.
topicPartitionFor(coordinatorKey), | ||
Duration.ofMillis(config.shareCoordinatorWriteTimeoutMs()), | ||
coordinator -> coordinator.initializeState(requestForCurrentPartition) | ||
).exceptionally(deleteException -> |
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.
nit: initializeException?
List<InitializeShareGroupStateResponseData.PartitionResult> partitionResults = new ArrayList<>(topicEntry.size()); | ||
topicEntry.forEach( | ||
(partitionId, responseFuture) -> { | ||
// ResponseFut would already be completed by now since we have used |
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.
The variable name was different in the code you copied here :)
)) | ||
)) | ||
); | ||
WriteShareGroupStateResponseData responseData = new WriteShareGroupStateResponseData().setResults( |
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.
I think the previous style of
new WriteShareGroupStateResponse()
.setResults(
was more in line with the rest of the code you've written.
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.
It will need to be changed to as older style causes bad alignment. I have a JIRA for the same.
In this PR, we have added the share coordinator and KafkaApis side impl of the intialize share group state RPC.
ref: https://cwiki.apache.org/confluence/display/KAFKA/KIP-932%3A+Queues+for+Kafka#KIP932:QueuesforKafka-InitializeShareGroupStateAPI