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

Bug with message leak in BufferedProducer::flush(timeout) #150

Merged
merged 2 commits into from
Dec 16, 2018

Conversation

accelerated
Copy link
Contributor

There is currently a bug inside BufferedProducer::flush(timeout) where if the timeout expired before the temporary flush_queue is completely purged, the remaining unsent messages are deleted when the function returns. The remaining messages must be re-enqueued back.

The solution could be made more performant if the QueueType is changed from deque to list and list::splice() is used instead of inserting at the front of the deque. However this method is not very popular (probably) and deque performs better than a list overall...so not sure if it's worth the hassle.

@mfontanini mfontanini merged commit f14a4b9 into mfontanini:master Dec 16, 2018
@accelerated accelerated deleted the flush_bug branch April 26, 2019 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants