-
Notifications
You must be signed in to change notification settings - Fork 85
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
feat(storage): store thin state diff in a file #1290
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1290 +/- ##
==========================================
+ Coverage 72.42% 72.55% +0.13%
==========================================
Files 84 84
Lines 8144 8257 +113
Branches 8144 8257 +113
==========================================
+ Hits 5898 5991 +93
+ Misses 1309 1305 -4
- Partials 937 961 +24
... and 1 file with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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.
Reviewed 9 of 10 files at r1, 1 of 4 files at r2, 3 of 3 files at r3, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @dan-starkware)
crates/papyrus_storage/src/lib.rs
line 527 at r1 (raw file):
.ok_or(StorageError::DBInconsistency { msg: format!("ThinStateDiff at location {:?} not found.", location), })?),
I think you should return None instead of an error.
Code quote:
.ok_or(StorageError::DBInconsistency {
msg: format!("ThinStateDiff at location {:?} not found.", location),
})?),
crates/papyrus_storage/src/lib.rs
line 532 at r1 (raw file):
.get(location)? .ok_or(StorageError::DBInconsistency { msg: format!("ThinStateDiff at location {:?} not found.", location),
same
Code quote:
.ok_or(StorageError::DBInconsistency {
msg: format!("ThinStateDiff at location {:?} not found.", location),
crates/papyrus_storage/src/lib.rs
line 546 at r3 (raw file):
FileAccess::Writers(file_writers) => file_writers.thin_state_diff.flush(), } }
Shouldn't this be async func?
Code quote:
fn flush(&self) {
match self {
FileAccess::Readers(_) => (),
FileAccess::Writers(file_writers) => file_writers.thin_state_diff.flush(),
}
}
27ed5b1
to
d13cde1
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.
Reviewable status: 8 of 12 files reviewed, 1 unresolved discussion (waiting on @yair-starkware)
crates/papyrus_storage/src/lib.rs
line 546 at r3 (raw file):
Previously, yair-starkware (Yair) wrote…
Shouldn't this be async func?
Done.
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.
Reviewed 1 of 4 files at r5, 3 of 3 files at r6, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @dan-starkware)
Pull Request type
Please check the type of change your PR introduces:
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this introduce a breaking change?
Other information
This change is