-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Description
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.