-
Notifications
You must be signed in to change notification settings - Fork 14.9k
KAFKA-20064: Made PartitionLeaderCache thread safe. #21335
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
Conversation
|
@Nikita-Shupletsov Test failures for |
|
And is this PR superseding #21298? |
fixed
this PR is from @seekskyworld. He and I sent our PRs in parallel |
AndrewJSchofield
left a comment
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. Some comments from an initial review.
clients/src/main/java/org/apache/kafka/clients/admin/internals/AdminApiDriver.java
Show resolved
Hide resolved
|
|
||
| @Override | ||
| public InetAddress[] resolve(String host) throws UnknownHostException { | ||
| System.out.println("RESOLVE: " + host); |
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.
Please remove the println.
| adminClient = KafkaAdminClient.createInternal(new AdminClientConfig(clusterInstance.setClientSaslConfig(props), true), | ||
| null, new TestHostResolver()); | ||
|
|
||
| Field clientField = KafkaAdminClient.class.getDeclaredField("client"); |
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 would prefer TestUtils.fieldValue here.
Replaced direct reflection with TestUtils.
AndrewJSchofield
left a comment
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. Looks good to me.
* Introduced a new class - PartitionLeaderCache * Changed the usage of the cache to make calls atomic(e.g. getting cached and non-cached values as one call instead of two, deleting cached values as one call, not one by one) * Added an integration test that tests the concurrent access of the cache Reviewers: Andrew Schofield <aschofield@confluent.io>
* Introduced a new class - PartitionLeaderCache * Changed the usage of the cache to make calls atomic(e.g. getting cached and non-cached values as one call instead of two, deleting cached values as one call, not one by one) * Added an integration test that tests the concurrent access of the cache Reviewers: Andrew Schofield <aschofield@confluent.io>
Backport of #21335 * Introduced a new class - PartitionLeaderCache * Changed the usage of the cache to make calls atomic(e.g. getting cached and non-cached values as one call instead of two, deleting cached values as one call, not one by one) * Added an integration test that tests the concurrent access of the cache Reviewers: Andrew Schofield <aschofield@confluent.io>, Chia-Ping Tsai <chia7712@gmail.com>
|
@clolov Can we target this patch for the 4.2.0 release? |
* Introduced a new class - PartitionLeaderCache * Changed the usage of the cache to make calls atomic(e.g. getting cached and non-cached values as one call instead of two, deleting cached values as one call, not one by one) * Added an integration test that tests the concurrent access of the cache Reviewers: Andrew Schofield <aschofield@confluent.io>
|
chatted with @clolov offline, and he agrees to cherry-pick to 4.2 |
cached and non-cached values as one call instead of two, deleting cached
values as one call, not one by one)
cache
Reviewers: Andrew Schofield aschofield@confluent.io