-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Use AbstractCASReferenceCounted to ensure entry.retain() is valid #2995
Conversation
1037588
to
21a94a6
Compare
@merlimat did you get chance to test this change with perf-producer and multiple subscription consumers.? |
@rdhabalia No, I haven't. I think to trigger the issue also the cache need to run eviction at the same time |
run integration tests |
rerun integration tests |
1 similar comment
rerun integration tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@merlimat shall we also adopt this in bookkeeper? since we are using that for ByteBufList
. ByteBufList
is a core structure in v2 protocol.
I don't think it should be a problem there because when we call |
run integration tests |
2 similar comments
run integration tests |
run integration tests |
Motivation
This will fix the root case of #2993 by using a version of
AbstractReferenceCounted
based 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