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
Prefactor: Extract store and sharded_lmdb into their own crates #7904
Prefactor: Extract store and sharded_lmdb into their own crates #7904
Conversation
3a18f8b
to
2cf146d
Compare
2cf146d
to
bfc7751
Compare
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.
LGTM, small questions rather than suggestions :)
src/rust/engine/fs/store/src/lib.rs
Outdated
Err(blocking_err) => Err(format!("Unable to run blocking task to load_bytes in local ByteStore on tokio runtime: {}", blocking_err)), | ||
} | ||
}).to_boxed() | ||
let (env, db, _) = dbs.clone()?.get(&digest.0); |
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.
Is this formatting change intentional? I'm assuming it is, but it looks suspiciously like IntelliJ messing things up.
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.
It is whatever rustfmt did for me. That said, unindenting it was fine by rustfmt too, so... Ugh, I miss formatters which have one true style :)
src/rust/engine/fs/store/src/lib.rs
Outdated
use std::sync::Arc; | ||
use std::time; | ||
use tempfile::TempDir; | ||
|
||
use super::MAX_LOCAL_STORE_SIZE_BYTES; |
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'm a little bit confused as to why this lives here, is this constant fs
-dependent?
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.
Moved some things around, added some comments
Directories are tiny. Hopefully this will help us avoiding OOMing on CI.
I'm about to introduce a second wrapper around
ShardedLmdb
separate fromStore
, and this will make it easier to introduce this.This is just a set of extractions of types; there are no functional changes here.