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

@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.

// metadata. For all cached keys, they can proceed straight to the fulfillment map.
// Note that the cache is only used on the initial calls, and any errors that result
// in additional lookups use the full set of lookup keys.
retryLookup(future.uncachedLookupKeys());
Copy link
Member

Choose a reason for hiding this comment

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

Can't you remove uncachedLookupKeys entirely?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

if I understand the suggestion correctly, I already have: https://github.com/apache/kafka/pull/21335/changes#diff-6414b53806c9ce1b21cd8f6966e1427789e62c927969cfd4c856660994ce0944L46

if you mean something else, please let me know, thanks!


@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.

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.

3 participants