Use AbstractCASReferenceCounted to ensure entry.retain() is valid#2995
Merged
Conversation
merlimat
force-pushed
the
fix-entry-cache-refcount
branch
from
November 16, 2018 01:12
1037588 to
21a94a6
Compare
rdhabalia
approved these changes
Nov 16, 2018
Contributor
|
@merlimat did you get chance to test this change with perf-producer and multiple subscription consumers.? |
Contributor
Author
|
@rdhabalia No, I haven't. I think to trigger the issue also the cache need to run eviction at the same time |
Contributor
Author
|
run integration tests |
massakam
approved these changes
Nov 16, 2018
Contributor
|
rerun integration tests |
1 similar comment
Contributor
Author
|
rerun integration tests |
Contributor
Author
I don't think it should be a problem there because when we call |
Contributor
Author
|
run integration tests |
2 similar comments
Contributor
|
run integration tests |
Contributor
|
run integration tests |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
This will fix the root case of #2993 by using a version of
AbstractReferenceCountedbased oncompareAndSet()rather than optimistic counter increase. This would ensure that when callingentry.retain(), if we don't get an exception the entry is guaranteed to be valid.More detailed discussion at netty/netty#8563