Skip to content

Unexpected behaviour may occur when AsyncDisruptorAppender#producerType is set to SINGLE with multiple appending threads #608

@brenuart

Description

@brenuart

Unexpected behaviour may happen when AsyncDisruptorAppender#producerType is set to SINGLE while multiple threads are appending to the appender.

Setting the producer type to SINGLE is an optimisation of the LMX disruptor for cases where only one thread is ever appending to the ring buffer. However, behaviour is unpredictable if the single thread condition is not verified. There is unfortunately no easy way to verify this condition when the appender is first initialised and therefore no way to protect ourselves from a "bad" configuration.

I was wondering if the performance improvement is worth it... I mean, most people won't even notice the difference and worst, are likely to loose events without even noticing it if they set the parameter to an inappropriate value. And if they loose some, they are unlikely to find the cause by themselves :-(

Hence the question: should we keep this configuration option at all ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions