-
Notifications
You must be signed in to change notification settings - Fork 79
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
snapshots: SnapshotPath.step_range #2419
Merged
+627
−506
Merged
Changes from 1 commit
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
0392457
define steps
battlmonstr 31c2ca6
refactor SnapshotPath clients to block_range
battlmonstr 593a577
convert SnapshotPath to step_range basis
battlmonstr a2e960e
remove nodiscard
battlmonstr 5899663
rename build/from to make
battlmonstr 91cd1e1
inline last_write_time
battlmonstr 2b4d649
convert clients to step_range
battlmonstr 0b05161
expose related_path
battlmonstr 94a2c37
remove SnapshotRepository::missing_block_ranges
battlmonstr a6b35b7
bundles_in_range: move to repository
battlmonstr 1473368
move snapshot size filter out from Config
battlmonstr 735bc21
SnapshotSync::seed_frozen_local_snapshots: don't use max_block_number…
battlmonstr f5a87be
contains_range
battlmonstr 39d7bb1
TemporaryFile: set stream exceptions
battlmonstr adcb8bd
TxnId
battlmonstr 680f3a8
refactor sample snapshot paths
battlmonstr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
SnapshotSync::seed_frozen_local_snapshots: don't use max_block_number…
…, remove compute_max_block
commit 735bc218fed506333232eceb774c7f7cbfff99ce
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
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.
Why adding this helper method and removing similar ones for
last_write_time
andindex_file_for_type
orsnapshot_path_for_type
?I'm fine with this
exists
helper, but I suggest to keep the existing ones as well.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.
Removing path_for_type is not related to steps indeed, but as I wanted to keep SnapshotPath as clean as possible, somehow I couldn't resist doing it in this PR :) I agree that the
path_for_type
is nice, and I will introduce it later in a different schema-related class and replace direct related_path calls to a higher level API.The idea is that in the future SnapshotPath will be just a container for meta-data encoded in the filename + the full path. In order to get SnapshotType (and things like
index_file_for_type
) the code will need to consult "schema" - a new decoupled object. So instead of deducing a schema element from path, we'll normally do the other way around: deduce path(s) from schema. The few cases where we need to go from path to schema will be a new method likeschema.type_of_path(path)
. Removingpath_for_type
is a preparation for this change.