-
Notifications
You must be signed in to change notification settings - Fork 49
database: impl service::{Request,Response}
mappings
#101
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
Conversation
`add_block()` takes `VerifiedBlockInformation` such that it can just take the inner blobs of data. This is a problem when reactively resizing since we no longer have the block struct we just gave away so we're forced to `.clone()` each retry. Instead of that - we will proactively resize so the resize error will never occur in the first place.
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.
@Boog900 As add_block()
will take VerifiedBlockInformation
by value so it can just take the inner data instead of cloning, the resize retry problem here is fixed using #101 (comment).
Another option is just setting the memory map to a large value at startup (e.g. 16TB
) such that this error never occurs - I'm not sure what the overhead in doing this is though.
@hinto-janai Why does add block need to take by value? it should be able to just reference the data |
I looked into setting the memory map size high and it supposedly works on linux but I found a few people mentioning problems on windows/ other platforms, maybe these have been fixed but I would rather not do this if we don't have to. |
Mostly because block blobs is I guess we could clone it inside |
you can ref cast: https://docs.rs/bytemuck/latest/src/bytemuck/transparent.rs.html#142-155 |
Right... I forgot, will make I'll revert it so |
I don't think there is anything wrong with trying 3 times though, better to go to high than to low IMO |
Sorry, should be ready now. |
Co-authored-by: Boog900 <boog900@tutanota.com>
Part 19
#98 <- Previous Next -> #102
cuprate_types::service::{Request,Response}
typesfn
signatures for theservice
reader/writer threads (impl after database: implementops/
#102 is merged)service
reader/writer thread request/response/fn mapping logicEnv::resize_map()
return the new memory map size