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

server: Don't wait or try to send notfound data. #3204

Merged
merged 1 commit into from
Oct 31, 2023

Conversation

davecgh
Copy link
Member

@davecgh davecgh commented Oct 31, 2023

This modifies the recent concurrent getdata serving logic to immediately decrement the pending item count and move on to the next requested data item when an item is not found.

Not only is it more efficient since it means there is no attempt to acquire the semaphore, it also prevents an issue the new code introduced where it could incorrectly queue up a nil message leading to a panic.

@davecgh davecgh added this to the 1.9.0 milestone Oct 31, 2023
server.go Show resolved Hide resolved
@davecgh davecgh force-pushed the server_no_wait_on_notfound_data branch from 963a341 to d582422 Compare October 31, 2023 18:14
This modifies the recent concurrent getdata serving logic to immediately
decrement the pending item count and move on to the next requested data
item when an item is not found.

Not only is it more efficient since it means there is no attempt to
acquire the semaphore, it also prevents an issue the new code introduced
where it could incorrectly queue up a nil message leading to a panic.
@davecgh davecgh force-pushed the server_no_wait_on_notfound_data branch from d582422 to c1e4cdd Compare October 31, 2023 18:16
@davecgh davecgh merged commit c1e4cdd into decred:master Oct 31, 2023
2 checks passed
@davecgh davecgh deleted the server_no_wait_on_notfound_data branch October 31, 2023 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