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

address cache bug with value supplier #1245

Merged
merged 1 commit into from
Sep 30, 2019

Conversation

tcellucci
Copy link
Contributor

this PR is a different fix to issue #1242, "Fix DeserializerStringCache if value transformer is used". See issue 1242 for details on the situation, but the summary is that the DeserializerStringCache may not properly handle caching for strings when a 'value transformer' is present.

The fix in this PR updates the CharacterBuffer classes to include a new 'variant' field that disambiguates identical cache entries with the same key but different values. The value of 'variant' is unique to the type of the valueTransformer, which is appropriate for implementations that provide consistent output for a given cached 'string' (as seen in Eureka's InstanceInfoDeserializer).

Thanks to GFriedrich, who identified this issue and submitted alternate PR #1243 as well as a unit test to isolate the issue. His test is also incorporated with this PR.

@troshko111 troshko111 merged commit 743af8b into Netflix:master Sep 30, 2019
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.

None yet

2 participants