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

consumer: cleanup RDY handling; fix pausing #249

Merged
merged 7 commits into from
Mar 14, 2019

Conversation

mreiferson
Copy link
Member

this addresses the issue reported in #222

@mreiferson
Copy link
Member Author

RFR

mock_test.go Outdated Show resolved Hide resolved
@ploxiln
Copy link
Member

ploxiln commented Mar 7, 2019

I noticed that rdyRetryMtx and backoffMtx can be plain Mutex instead of RWMutex

@ploxiln
Copy link
Member

ploxiln commented Mar 7, 2019

This is honestly the part of NSQ that I'm least familiar with ... the technical details of how ready-count is "refilled" and such ... I'll keep looking and slowly digesting though :)

@mreiferson
Copy link
Member Author

Addressed comments.

the technical details of how ready-count is "refilled" and such

Yea, this is just old and outdated code that's already been addressed in pynsq. See nsqio/nsq#404 for relevant context.


timeoutCh := time.After(500 * time.Millisecond)
pauseCh := time.After(50 * time.Millisecond)
unpauseCh := time.After(75 * time.Millisecond)
Copy link
Member Author

Choose a reason for hiding this comment

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

This is a little fragile and time dependent, but should be reasonably stable.

conn.go Show resolved Hide resolved
mock_test.go Show resolved Hide resolved
mock_test.go Show resolved Hide resolved
@ploxiln
Copy link
Member

ploxiln commented Mar 11, 2019

looks good 👍

@mreiferson mreiferson merged commit 61f49c0 into nsqio:master Mar 14, 2019
@mreiferson mreiferson deleted the pause branch March 14, 2019 04:16
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.

2 participants