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

Be more defensive when evaluating retention. #155

Merged
merged 1 commit into from
Jan 26, 2024

Conversation

kjnilsson
Copy link
Contributor

It is possible that osiris_log:evaluate_retention/1 may throw an error, in particular missing_file which could occur if an osiris member was deleted whilst an evaluation request was outstanding.
Currently this crashes the evaluation process which isn't a big deal
as it will restart but we'd lose any pending evaluation requests when this happen so it is better to try to avoid that.

It is possible that osiris_log:evaluate_retention/1 may throw an
error, in particular `missing_file` which could occur if an osiris
member was deleted whilst an evaluation request was outstanding.
 Currently this crashes the evaluation process which isn't a big deal
as it will restart but we'd lose any pending evaluation requests when this
happen so it is better to try to avoid that.
@michaelklishin michaelklishin merged commit d47c4f7 into main Jan 26, 2024
6 checks passed
@michaelklishin michaelklishin deleted the retention-eval-defensive branch January 26, 2024 14:11
@michaelklishin michaelklishin added this to the 1.7.3 milestone Jan 26, 2024
Comment on lines +79 to +81
catch _:Err ->
?DEBUG_(Name, "retention evaluation failed with ~w", [Err]),
{noreply, State}
Copy link
Member

Choose a reason for hiding this comment

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

Are errors frequent here? If not, woult it be useful to also log the stacktrace?

@michaelklishin michaelklishin added this to the 1.8.0 milestone Feb 21, 2024
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.

3 participants