-
-
Notifications
You must be signed in to change notification settings - Fork 889
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
Handle scheduled task errors #3090
Handle scheduled task errors #3090
Conversation
As with #3077, I am making this PR directly into the |
12c666e
to
103f744
Compare
Please change the target to main branch, we will publish 0.18 soon and wont make another 0.17 release. |
Got it, will rebase in a moment |
103f744
to
1c7bfd6
Compare
fc51418
to
28360de
Compare
Rebased onto main 👍 Note, my branch also included the changes from #3077 which was already merged but is currently missing in main |
These changes on the original 0.17 branch have been verified live in https://lemm.ee - deadlocks are no longer killing the scheduled tasks thread (but deadlocks still occur as expected) |
28360de
to
0bb4a0e
Compare
Err(e) => { | ||
error!("Failed to update post_aggregates hot_ranks: {}", e) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice to use .inspect_err()
here, but sadly thats only on nightly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't .map_err()
do the same thing here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Map functions need to return a value. It would probably work anyway, but might be confusing to read.
CI test failures seem unrelated to my changes. I think I can't re-run CI myself, is that correct? |
Not sure, anyway I restarted it now. |
0bb4a0e
to
786c586
Compare
786c586
to
edd45a0
Compare
Thank you for submitting this PR. I've also seen similar errors in my logs. Looking forward to seeing this in a release version :) |
Currently, when an error occurs in a scheduled task, it panics and the thread dies while the main lemmy_server process continues working.
This PR removes the panics from scheduled tasks in order to allow the thread to keep working.
This is a partial solution to #3076