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

GC nepotism in linked data structures #3794

Closed
akarnokd opened this issue Mar 23, 2016 · 1 comment
Closed

GC nepotism in linked data structures #3794

akarnokd opened this issue Mar 23, 2016 · 1 comment

Comments

@akarnokd
Copy link
Member

There was a post just recently by @nitsanw warning about the problem called GC nepotism.

This affects our older copies of the JCTools queues, MpscLinkedQueue and SpscLinkedArrayQueue. There is an issue, #1735, about shading which would fix it, but that could happen in any time, even after some more small version changes.

In addition, the issue affects both the bounded versions of replay() and ReplaySubject. The problem there is that individual subscribers could be at any point in the linked-node sequence we can't just null out links when the operators move their head forward (trimming).

It might be possible to null out the right node by scanning the known child subscribers and chosing the earliest node any of them knows about. Unfortunately, this also requires back-references between nodes as well as node indexing, taking extra time and extra concurrency considerations.

@akarnokd
Copy link
Member Author

Closing as mostly resolved where it was possible.

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

No branches or pull requests

1 participant