Skip to content

11243::RLS cleanups #12085

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

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

Conversation

vimanikag
Copy link
Contributor

@vimanikag vimanikag commented May 22, 2025

addressed the review comments provided on #11243

  1. adding junit's for cache.fitToLimit()

Fixes : #11243

@vimanikag vimanikag marked this pull request as ready for review May 26, 2025 13:51
…manikag-FIX_11243_RLS

# Conflicts:
#	rls/src/main/java/io/grpc/rls/LinkedHashLruCache.java
@shivaspeaks shivaspeaks reopened this Jun 18, 2025
@vimanikag vimanikag marked this pull request as draft June 18, 2025 14:06
@vimanikag vimanikag marked this pull request as ready for review June 18, 2025 16:07
@vimanikag vimanikag requested a review from ejona86 June 23, 2025 08:03
@ejona86 ejona86 added the kokoro:run Add this label to a PR to tell Kokoro the code is safe and tests can be run label Jun 23, 2025
@grpc-kokoro grpc-kokoro removed the kokoro:run Add this label to a PR to tell Kokoro the code is safe and tests can be run label Jun 23, 2025
Copy link
Member

@ejona86 ejona86 left a comment

Choose a reason for hiding this comment

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

In CachingRlsLbClient, shouldInvalidateEldestEntry() is managed based on time, as we make sure an entry is not too new. But this is valid, even if it is misleading on how the class is intended to be used.

@Test
public void testFitToLimitWithReSize() {

Entry entry1 = new Entry("Entry1", ticker.read() + 10,4);
Copy link
Member

Choose a reason for hiding this comment

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

Add space after comma (ditto in next test)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Addressed the review comments

assertThat(localCache.fitToLimit()).isEqualTo(true);

assertThat(localCache.values().contains(entry1)).isFalse();
assertThat(localCache.values().containsAll(Arrays.asList(entry2,entry3))).isTrue();
Copy link
Member

Choose a reason for hiding this comment

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

Add space after comma

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Addressed the review comments

@shivaspeaks shivaspeaks self-requested a review June 24, 2025 06:10
Copy link
Member

@shivaspeaks shivaspeaks left a comment

Choose a reason for hiding this comment

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

Merge branch master into your branch to include #12169 so that your Linux artifacts Kokoro build passes.

@ejona86 ejona86 added the kokoro:run Add this label to a PR to tell Kokoro the code is safe and tests can be run label Jun 24, 2025
@grpc-kokoro grpc-kokoro removed the kokoro:run Add this label to a PR to tell Kokoro the code is safe and tests can be run label Jun 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RLS cleanups
4 participants