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

logreader: fix spurious wakeups by updating the suspended flag on I/O poll #299

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MrAnno
Copy link
Member

@MrAnno MrAnno commented Sep 20, 2024

No description provided.

… poll

Signed-off-by: László Várady <laszlo.varady@anno.io>
@@ -335,6 +335,7 @@ log_reader_update_watches(LogReader *self)
switch (prepare_action)
{
case LPPA_POLL_IO:
self->suspended = FALSE;
Copy link
Member

Choose a reason for hiding this comment

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

[nitpick/question]

Although LPPA_POLL_IO was the only case where setting/unsetting self->suspended was missing, I feel like the truthy state of self->suspended is not decided at this point, but earlier at free_to_send. Of course ProtoServer can override it with LPPA_SUSPEND, but as soon as log_source_free_to_send() returns true, we could set self->suspended to false. Am I understanding this right?

This is just a strange feeling though, I think everything is behaving as expected with your change.

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