This repository has been archived by the owner on Jan 22, 2025. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
rework accounts hash calc dedup to avoid kernel file error #33195
rework accounts hash calc dedup to avoid kernel file error #33195
Changes from all commits
66f6c77
c14466c
7f72ce7
2991a4b
34e37e2
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
I know that in
append_vec.rs
if creating the Mmap fails we'll callexit()
, but that feels strange to me. Seems like apanic
orexpect
would work here too. Wdyt?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.
this looks to be copied from append vec, where stephen wrote this 3 years ago.
Some thoughts:
error messages get logged immediately.
Panics get delayed sometimes and eaten until a thread is joined (IIRC).
Either way it is an error condition. I'm not sure what is best.
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.
Yeah, likely won't matter much, since if we cannot create a new mmap file then it's likely the whole system is borked.
I tend to think a library function shouldn't call
exit
, but instead assert its invariants. We also get a backtrace with panics, but I doubt it would contain useful information. I'd lean towards doing anexpect
with a message like "create accounts hashes mmap file".Not a dealbreaker for me, so I defer to you on this one.
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.
#12213
Here is the source of the copied code.
@sakridge what do you think?
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.
We have some inconsistency.
Here's an info I added a few years ago: #17727
Sometimes we just unwrap the mmap.
solana/accounts-db/src/cache_hash_data.rs
Line 96 in 527a4bb