opencensus-java
opencensus-java copied to clipboard
Consider changing DisruptorEventQueue.enqueue() to avoid possibility of blocking
Does it make sense to change DisruptorEventQueue.enqueue() to use RingBuffer.tryNext() instead of RingBuffer.next() to avoid possibly blocking in the case the producers overrun the consumer due to load or a future bug in the consumer?
In all of our use-cases our preference would be to drop the metrics rather than block.
https://github.com/census-instrumentation/opencensus-java/blob/aa8ee6a526e11e5763d2f508bd6952a1b87e3a51/impl/src/main/java/io/opencensus/impl/internal/DisruptorEventQueue.java#L130-L142
I created PR for this issue! : https://github.com/census-instrumentation/opencensus-java/pull/1837