-
Notifications
You must be signed in to change notification settings - Fork 311
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 file store #1684
Open
nymius
wants to merge
7
commits into
bitcoindevkit:master
Choose a base branch
from
nymius:bugfix/i-1517-store-append-after-open-causes-overwrite
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Refactor file store #1684
nymius
wants to merge
7
commits into
bitcoindevkit:master
from
nymius:bugfix/i-1517-store-append-after-open-causes-overwrite
Commits on Nov 13, 2024
-
fix(store): replace
Path.exists
byOpenOptions.create_new
`Path.exists` is not safe against time-of-creation, time-of-use (TOCTOU) bugs. `OpenOptions.create_new` on the other hand is atomic, so not prone to this kind of problems.
Configuration menu - View commit details
-
Copy full SHA for 1f47348 - Browse repository at this point
Copy the full SHA 1f47348View commit details -
Configuration menu - View commit details
-
Copy full SHA for 703b8c7 - Browse repository at this point
Copy the full SHA 703b8c7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 723691f - Browse repository at this point
Copy the full SHA 723691fView commit details -
refactor(store)!: replace IterError with StoreError
`StoreError` included the `IterError` variants, making it replaceable.
Configuration menu - View commit details
-
Copy full SHA for 84197d7 - Browse repository at this point
Copy the full SHA 84197d7View commit details -
refactor(store)!: change Store's method names
The changes in this commit were motivated due to a bug in the `StoreFile` which caused old data to be lost if the file was `open` instead of created and new data was appended. The bugfix later motivated a general name cleanup in StoreFile's methods and some minor changes in their signatures. The new StoreFile methods are: - create: create file in write only mode or fail if file exists. - load: open existing file, check integrity of content and retrieve Store. - append: add new changesets to Store. Do nothing if changeset is empty. - dump: aggregate and retrieve all stored changesets in store. - load_or_create: load if file exists, create if not, and retrieve Store.
Configuration menu - View commit details
-
Copy full SHA for a3c3c42 - Browse repository at this point
Copy the full SHA a3c3c42View commit details -
Configuration menu - View commit details
-
Copy full SHA for 83e6229 - Browse repository at this point
Copy the full SHA 83e6229View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1251b82 - Browse repository at this point
Copy the full SHA 1251b82View commit details
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.