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

Avoid panics in the sentinel #8

Open
Forsworns opened this issue Sep 9, 2021 · 2 comments
Open

Avoid panics in the sentinel #8

Forsworns opened this issue Sep 9, 2021 · 2 comments
Labels
kind/enhancement Category issues or PRs related to enhancement.

Comments

@Forsworns
Copy link
Member

We should try our best to eliminate panics in the sentinel library. The errors should be propagated to the user or written into logs, instead of simply generating a fatal panic silently.

@sczyh30 sczyh30 added the kind/enhancement Category issues or PRs related to enhancement. label Sep 9, 2021
@Millione
Copy link
Contributor

Millione commented Jan 8, 2024

Recently, I got a fatal panic from https://github.com/sentinel-group/sentinel-rust/blob/main/sentinel-core/src/core/stat/base/bucket_leap_array.rs#L18. I wonder if I could just use tracing::error!() instead of panic?

@Forsworns
Copy link
Member Author

@Millione Yes sentinel should avoid these unwrap by throwing out the errors to the API caller. But currently it just panic silently. You can submit a PR if you are interested, thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Category issues or PRs related to enhancement.
Projects
None yet
Development

No branches or pull requests

3 participants