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

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

Closed
brenuart opened this issue Aug 16, 2021 · 3 comments
Labels
type/enhancement warn/deprecation Changes about to deprecate feature/methods/fields
Milestone

Comments

@brenuart
Copy link
Collaborator

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 ?

@brenuart
Copy link
Collaborator Author

@philsttr What do you think?

@philsttr
Copy link
Collaborator

Can be deprecated, for removal in 8.0

@brenuart
Copy link
Collaborator Author

brenuart commented Aug 24, 2021

@philsttr I mentioned the deprecation in the release note.

Don't you think we should also remove the section about the producer type from the README?
(my bad, nothing is said about this setting in the documentation)

@philsttr philsttr added this to the 7.0 milestone Aug 28, 2021
@philsttr philsttr added warn/deprecation Changes about to deprecate feature/methods/fields type/enhancement labels Nov 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement warn/deprecation Changes about to deprecate feature/methods/fields
Projects
None yet
Development

No branches or pull requests

2 participants