You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ATM an appender thread that allocate a new chunk (ie ! pooled one) makes the whole Q to be in a rotation state while requesting to the JVM to create a new array of references, preventing other offering threads to make progress.
To improve this situation we could make MpUnboundedXaddChunk::buffer a volatile field and change the append logic to populate MpUnboundedXaddChunk::buffer with a MpUnboundedXaddChunk::casBuffer after casProducerChunkIndex, leaving any accessing thread (ie other producers and consumers) to be able to initialize it using the casBuffer(null, new Object[chunkSize]) if the buffer is null while accessing.
This would reduce the time window where the producers/consumers won't make progress while relying on the automatic GC of the JVM, instead of the one of the queue (ie the pooled chunks).
The text was updated successfully, but these errors were encountered:
ATM an appender thread that allocate a new chunk (ie ! pooled one) makes the whole Q to be in a rotation state while requesting to the JVM to create a new array of references, preventing other offering threads to make progress.
To improve this situation we could make
MpUnboundedXaddChunk::buffer
a volatile field and change the append logic to populateMpUnboundedXaddChunk::buffer
with aMpUnboundedXaddChunk::casBuffer
aftercasProducerChunkIndex
, leaving any accessing thread (ie other producers and consumers) to be able to initialize it using thecasBuffer(null, new Object[chunkSize])
if thebuffer
isnull
while accessing.This would reduce the time window where the producers/consumers won't make progress while relying on the automatic GC of the JVM, instead of the one of the queue (ie the pooled chunks).
The text was updated successfully, but these errors were encountered: