Skip to content

Conversation

@Nikita-Shupletsov
Copy link
Contributor

@Nikita-Shupletsov Nikita-Shupletsov commented Jan 19, 2026

  • 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

@github-actions github-actions bot added triage PRs from the community clients labels Jan 19, 2026
@AndrewJSchofield AndrewJSchofield self-requested a review January 20, 2026 08:49
@AndrewJSchofield AndrewJSchofield added ci-approved and removed triage PRs from the community labels Jan 20, 2026
@AndrewJSchofield
Copy link
Member

@Nikita-Shupletsov Test failures for ConcurrentListOffsetsRequestTest I think. Please resolve.

@lianetm
Copy link
Member

lianetm commented Jan 20, 2026

And is this PR superseding #21298?

@Nikita-Shupletsov
Copy link
Contributor Author

Nikita-Shupletsov commented Jan 20, 2026

Test failures for ConcurrentListOffsetsRequestTest I think. Please resolve.

fixed

And is this PR superseding #21298?

this PR is from @seekskyworld. He and I sent our PRs in parallel

Copy link
Member

@AndrewJSchofield AndrewJSchofield left a 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.


@Override
public InetAddress[] resolve(String host) throws UnknownHostException {
System.out.println("RESOLVE: " + host);
Copy link
Member

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");
Copy link
Member

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.

Copy link
Member

@AndrewJSchofield AndrewJSchofield left a 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.

@AndrewJSchofield AndrewJSchofield merged commit 8209af2 into apache:trunk Jan 29, 2026
24 checks passed
Nikita-Shupletsov added a commit to Nikita-Shupletsov/kafka that referenced this pull request Jan 30, 2026
* 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>
Nikita-Shupletsov added a commit to Nikita-Shupletsov/kafka that referenced this pull request Jan 30, 2026
* 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>
chia7712 pushed a commit that referenced this pull request Jan 30, 2026
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>
@chia7712
Copy link
Member

@clolov Can we target this patch for the 4.2.0 release?

chia7712 pushed a commit that referenced this pull request Jan 30, 2026
* 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>
@chia7712
Copy link
Member

chatted with @clolov offline, and he agrees to cherry-pick to 4.2

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.

4 participants