Skip to content

Conversation

@merlimat
Copy link
Contributor

Motivation

This will fix the root case of #2993 by using a version of AbstractReferenceCounted based on compareAndSet() rather than optimistic counter increase. This would ensure that when calling entry.retain(), if we don't get an exception the entry is guaranteed to be valid.

More detailed discussion at netty/netty#8563

@merlimat merlimat added the type/bug The PR fixed a bug or issue reported a bug label Nov 16, 2018
@merlimat merlimat added this to the 2.2.1 milestone Nov 16, 2018
@merlimat merlimat self-assigned this Nov 16, 2018
@merlimat merlimat force-pushed the fix-entry-cache-refcount branch from 1037588 to 21a94a6 Compare November 16, 2018 01:12
@rdhabalia
Copy link
Contributor

@merlimat did you get chance to test this change with perf-producer and multiple subscription consumers.?

@merlimat
Copy link
Contributor Author

@rdhabalia No, I haven't. I think to trigger the issue also the cache need to run eviction at the same time

@merlimat
Copy link
Contributor Author

run integration tests

@massakam
Copy link
Contributor

rerun integration tests

1 similar comment
@merlimat
Copy link
Contributor Author

rerun integration tests

Copy link
Member

@sijie sijie left a 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.

@merlimat
Copy link
Contributor Author

@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 increase() we always have refCnt >= 1, therefore there's never the race condition on the release() getting to 0

@merlimat
Copy link
Contributor Author

run integration tests

2 similar comments
@hrsakai
Copy link
Contributor

hrsakai commented Nov 18, 2018

run integration tests

@massakam
Copy link
Contributor

run integration tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/bug The PR fixed a bug or issue reported a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants