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

Memoize buffer state #98

Merged
merged 2 commits into from Sep 24, 2016
Merged

Memoize buffer state #98

merged 2 commits into from Sep 24, 2016

Conversation

dwbutler
Copy link
Owner

When the buffer state is reset after dropping messages, the mutexes are also reinitialized with new instances. This causes an issue with buffer_flush when it tries to unlock the new mutex that it never locked, raising Attempt to unlock a mutex which is not locked (ThreadError).

This fixes the issue by memoizing the buffer mutexes and reusing them even when the buffer state is reset.

Fixes #97

When the buffer state is reset after dropping messages, the mutexes are also reinitialized with new instances. This causes an issue with `buffer_flush` when it tries to unlock the new mutex that it never locked, raising `Attempt to unlock a mutex which is not locked (ThreadError)`.

This fixes the issue by memoizing the buffer mutexes and reusing them even when the buffer state is reset.

Fixes #97
@dwbutler dwbutler added the bug label Sep 22, 2016
@dwbutler dwbutler merged commit 1db45ce into master Sep 24, 2016
@dwbutler dwbutler deleted the fix/buffer-mutex-memoization branch September 24, 2016 16:18
@dwbutler dwbutler changed the title Memoize buffer mutexes Memoize buffer state Sep 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Stack trace on losing logstash connection when using customize_event
1 participant