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

store-histogram: skip not found file meta #2906

Merged
merged 4 commits into from
Sep 18, 2024

Conversation

HaoranYi
Copy link

@HaoranYi HaoranYi commented Sep 12, 2024

Problem

store-histogram crash on not found file meta.

thread 'main' panicked at accounts-db/store-histogram/src/main.rs:252:58:
called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

this can actually happen.
#2906 (comment)

Summary of Changes

instead of crash when file meta is not found, we skip them and continue.

Fixes #

@HaoranYi HaoranYi changed the title add error message to show th filename when the file not fund store-histogram: Show filename in error message when hit the file not found exception Sep 12, 2024
Co-authored-by: Brooks <brooks@prumo.org>
brooksprumo
brooksprumo previously approved these changes Sep 12, 2024
Copy link

@brooksprumo brooksprumo left a comment

Choose a reason for hiding this comment

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

:shipit:

@HaoranYi
Copy link
Author

sorry to request review again.

need to format the file.

@jeffwashington
Copy link

this is fine. I'd rather it just keep running and log failing files. If you are running this while a validator is running, it could clean something away and delete it after getting the dir but before opening the file.

@HaoranYi
Copy link
Author

Ah. Make sense. That explains when I watch this command every 2 seconds. It failed from time to time.
I push a commit to skip failed metadata.

Copy link

@brooksprumo brooksprumo left a comment

Choose a reason for hiding this comment

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

:shipit:

@HaoranYi HaoranYi changed the title store-histogram: Show filename in error message when hit the file not found exception store-histogram: skip not found file meta Sep 13, 2024
Copy link

@jeffwashington jeffwashington left a comment

Choose a reason for hiding this comment

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

lgtm

@HaoranYi HaoranYi merged commit 92eca11 into anza-xyz:master Sep 18, 2024
40 checks passed
@HaoranYi HaoranYi deleted the store_histogram_error branch September 18, 2024 14:32
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