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

refactor(storage): use common file handler #1281

Merged
merged 2 commits into from
Oct 18, 2023

Conversation

dan-starkware
Copy link
Collaborator

@dan-starkware dan-starkware commented Oct 16, 2023

Pull Request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Build-related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this introduce a breaking change?

  • Yes
  • No

Other information


This change is Reviewable

@codecov
Copy link

codecov bot commented Oct 16, 2023

Codecov Report

Merging #1281 (669a97a) into main (ff1500d) will increase coverage by 0.02%.
The diff coverage is 77.08%.

@@            Coverage Diff             @@
##             main    #1281      +/-   ##
==========================================
+ Coverage   72.96%   72.99%   +0.02%     
==========================================
  Files          84       84              
  Lines        7968     7972       +4     
  Branches     7968     7972       +4     
==========================================
+ Hits         5814     5819       +5     
- Misses       1228     1229       +1     
+ Partials      926      924       -2     
Files Coverage Δ
crates/papyrus_storage/src/mmap_file/mod.rs 67.03% <77.08%> (+2.66%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@yair-starkware yair-starkware left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @dan-starkware)


crates/papyrus_storage/src/mmap_file/mod.rs line 102 at r1 (raw file):

/// A wrapper around `MMapFile` that provides both write and read interfaces.
#[derive(Clone, Debug)]
pub struct FileHandler<V: StorageSerde> {

I think this struct should be private (and move down in the file, maybe even into a module)

Code quote:

pub 

@dan-starkware dan-starkware force-pushed the dan/storage/mmap-writer-drop branch 3 times, most recently from 0a886a0 to 50740f3 Compare October 18, 2023 08:47
Base automatically changed from dan/storage/mmap-writer-drop to main October 18, 2023 09:31
@dan-starkware dan-starkware force-pushed the dan/storage/mmap-refactor-shared branch from f740416 to ca10986 Compare October 18, 2023 09:54
@dan-starkware dan-starkware force-pushed the dan/storage/mmap-refactor-shared branch from ca10986 to f5c9e6a Compare October 18, 2023 10:00
Copy link
Collaborator Author

@dan-starkware dan-starkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @yair-starkware)


crates/papyrus_storage/src/mmap_file/mod.rs line 102 at r1 (raw file):

Previously, yair-starkware (Yair) wrote…

I think this struct should be private (and move down in the file, maybe even into a module)

Done.

Copy link
Contributor

@yair-starkware yair-starkware left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r3, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @dan-starkware)


crates/papyrus_storage/src/mmap_file/mod.rs line 143 at r3 (raw file):

/// Represents a memory mapped append only file.
#[derive(Debug)]
pub struct MMapFile<V: StorageSerde> {

Private too?

Code quote:

pub

Copy link
Collaborator Author

@dan-starkware dan-starkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @yair-starkware)


crates/papyrus_storage/src/mmap_file/mod.rs line 143 at r3 (raw file):

Previously, yair-starkware (Yair) wrote…

Private too?

Sure in the next PR

@dan-starkware dan-starkware added this pull request to the merge queue Oct 18, 2023
Merged via the queue into main with commit c318b66 Oct 18, 2023
19 checks passed
@dan-starkware dan-starkware deleted the dan/storage/mmap-refactor-shared branch October 18, 2023 11:06
@github-actions github-actions bot locked and limited conversation to collaborators Oct 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants