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

reader: in send_rdy(), don't enforce total_rdy <= max_in_flight #230

Merged
merged 1 commit into from
Feb 25, 2019

Conversation

alpaker
Copy link
Contributor

@alpaker alpaker commented Feb 25, 2019

Naively enforcing that invariant in _send_rdy() prevents us from correctly updating each conn's rdy after reducing max_in_flight. Additionally, there's no need for this check in _send_rdy(), as all callers have logic that's supposed to determine an appropriate rdy value.

…n_flight

Naively enforcing that invariant prevents us from correctly updating each conn's rdy after reducing max_in_flight.  Additionally, there's no need for this check in _send_rdy(), as all callers have logic that's supposed to determine an appropriate rdy value.
@alpaker alpaker force-pushed the no-invariant-check-in-send-rdy branch from 88becee to d94d2e5 Compare February 25, 2019 16:33
@mreiferson mreiferson added the bug label Feb 25, 2019
Copy link
Member

@mreiferson mreiferson left a comment

Choose a reason for hiding this comment

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

LGTM

@mreiferson mreiferson merged commit b3d1d16 into nsqio:master Feb 25, 2019
@andyxning
Copy link
Member

andyxning commented Feb 26, 2019

Thanks @alpaker for checking and refactoring this code!

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.

3 participants