Skip to content
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

Cache CD dynamic properties #222

Merged
merged 3 commits into from
Dec 18, 2023
Merged

Cache CD dynamic properties #222

merged 3 commits into from
Dec 18, 2023

Conversation

mauhiz
Copy link
Contributor

@mauhiz mauhiz commented Dec 13, 2023

Fixes #221

@mauhiz mauhiz marked this pull request as ready for review December 13, 2023 07:57
@ocadaruma ocadaruma self-requested a review December 14, 2023 02:49
Copy link
Member

@ocadaruma ocadaruma left a comment

Choose a reason for hiding this comment

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

Good catching, thank you for the patch!

Left minor question.

Copy link
Member

@ocadaruma ocadaruma 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 update. left one comment

IntStream.range(0, 10000)
.mapToObj(i -> CONFIG_PARTITION_CONCURRENCY)
.map(supplier::getProperty);
assertEquals(1, supplier.getCachedProperties().size());
Copy link
Member

Choose a reason for hiding this comment

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

To check cache is working properly, I think it's better all property returned from supplier.getProperty are same reference, rather than checking the internal hashmap's content

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fair enough. Fixed

Copy link
Member

@ocadaruma ocadaruma left a comment

Choose a reason for hiding this comment

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

Thanks LGTM!

@ocadaruma ocadaruma merged commit 2724000 into line:master Dec 18, 2023
5 checks passed
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.

CentralDogmaPropertySupplier may leak watchers
2 participants