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

Copy Nearcacheconfig when it needs to be changed #18348

Merged
merged 2 commits into from Mar 4, 2021

Conversation

sancar
Copy link
Contributor

@sancar sancar commented Mar 3, 2021

This reverts commit 8df8a6e.

Copies NearcacheConfig and EvictionConfig when they needs
to be changed by NearcacheConfigAccessor so that the object
on ClientConfig/Config does not change when used.

fixes #17952
fixes https://github.com/hazelcast/hazelcast-enterprise/issues/3966

@sancar sancar marked this pull request as ready for review March 3, 2021 15:34
@sancar sancar requested a review from a team as a code owner March 3, 2021 15:34
@sancar sancar self-assigned this Mar 3, 2021
@sancar sancar added this to the 4.2 milestone Mar 3, 2021
@sancar sancar requested a review from ahmetmircik March 3, 2021 15:40
* Used by the {@link NearCacheConfigAccessor} to
* initialize the proper default value for on-heap maps.
*/
boolean sizeConfigured;
Copy link
Member

Choose a reason for hiding this comment

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

if sizeConfigured was set to true, after deserialization what keeps it still true?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have reverted the EvictionConfig behaviour. So it seems that setting sizeConfigured on deserialization was not necessary. For the sake of keeping it backward compatible, I will not touch this. Lets consider if that is necessary as a separate fix if needed.

Copy link
Member

Choose a reason for hiding this comment

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

thanks, i see this is an existing issue, not introduced in this PR. Created an issue for it: #18354

@sancar sancar force-pushed the fix/evictionconfig/master branch from a7747a2 to e5051d2 Compare March 4, 2021 09:33
Copies NearcacheConfig and EvictionConfig when they needs
to be changed by NearcacheConfigAccessor so that the object
on ClientConfig/Config does not change when used.

fixes  hazelcast#17952
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.

NearCache eviction config differs when a client is recreated with the same ClientFailoverConfig
4 participants