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

[FIXED] Clustering: possible slow consumer errors #1169

Merged
merged 1 commit into from Mar 5, 2021
Merged

Conversation

kozlovic
Copy link
Member

@kozlovic kozlovic commented Mar 5, 2021

This was introduced in v0.21.0 when I moved to sync subscriptions
and missed the fact that the pending limits do not apply to those
type of subscriptions.
Switching to async sub and adding buffers to a pending list.
These are consumed in the Read() call made by the RAFT library.

Signed-off-by: Ivan Kozlovic ivan@synadia.com

This was introduced in v0.21.0 when I moved to sync subscriptions
and missed the fact that the pending limits do not apply to those
type of subscriptions.
Switching to async sub and adding buffers to a pending list.
These are consumed in the Read() call made by the RAFT library.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
@coveralls
Copy link

Coverage Status

Coverage increased (+0.04%) to 91.626% when pulling a5739e4 on fix_raft_subs into 0b54427 on master.

next *pendingBuf
}

var pendingBufPool = &sync.Pool{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see you use these, they help?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly, with tests I have done, not really. But I have been using some in SQL code, etc..

Copy link
Member

@derekcollison derekcollison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kozlovic kozlovic merged commit 88d1466 into master Mar 5, 2021
@kozlovic kozlovic deleted the fix_raft_subs branch March 5, 2021 00:23
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.

None yet

3 participants