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

Wait on events and messages simultaneously to prevent queue buildup #235

Merged
merged 3 commits into from
Mar 24, 2023

Conversation

phil-opp
Copy link
Collaborator

Before we only received the events from the queue when the next message arrived from the node. This could result in very large queue lengths when nodes call dora functions infrequently (e.g. when they do a lot of processing). By waiting for both new events and new messages at the same time, we can drop old events directly and avoid this queue buildup.

Before we only received the events from the queue when the next message arrived from the node. This could result in very large queue lengths when nodes call dora functions infrequently (e.g. when they do a lot of processing). By waiting for both new events and new messages at the same time, we can drop old events directly and avoid this queue buildup.
@phil-opp phil-opp requested a review from haixuanTao March 23, 2023 12:09
@haixuanTao haixuanTao merged commit ccec196 into main Mar 24, 2023
@haixuanTao haixuanTao deleted the prevent-queue-buildup branch March 24, 2023 07:43
haixuanTao added a commit that referenced this pull request Mar 30, 2023
It seems that this loop is infinite if the channel is disconnected meaning
that the sending end of the channel is closed and there is no more node event.

This will result in `events.recv()` always returning `None`.

This bug seems to have been introduced in #235 .
haixuanTao added a commit that referenced this pull request Mar 30, 2023
It seems that this loop is infinite if the channel is disconnected meaning
that the sending end of the channel is closed and there is no more node event.

This will result in `events.recv()` always returning `None`.

This bug seems to have been introduced in #235 .
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