-
Notifications
You must be signed in to change notification settings - Fork 154
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
irmin-pack: disallow split when gc is disallowed #2175
Merged
Merged
Conversation
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
metanivek
force-pushed
the
fix_split_from_v2_always
branch
from
January 20, 2023 20:58
880f886
to
2843f53
Compare
art-w
approved these changes
Jan 30, 2023
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.
Thanks a lot for taking care of this! It looks good :)
The value stored in the control file is *not* inclusive of the dead header size, so we must subtract it from the on-disk size before passing to Append_only_file's open function. Otherwise, the consistency check is not correct and will falsely claim the chunk is inconsistent.
Split will raise an exception if it is not allowed. Also, expose a function for checking if it is enabled, which is the same as GC being enabled or not.
metanivek
force-pushed
the
fix_split_from_v2_always
branch
from
January 31, 2023 19:49
662f57f
to
52f2f81
Compare
metanivek
added a commit
to metanivek/opam-repository
that referenced
this pull request
Apr 21, 2023
…min-pack, irmin-pack-tools, irmin-mirage, irmin-mirage-graphql, irmin-mirage-git, irmin-http, irmin-graphql, irmin-git, irmin-fs, irmin-containers, irmin-cli, irmin-chunk and irmin-bench (3.7.0) CHANGES: ### Added - **irmin** - Add `Conf.pp` and `Conf.equal` to print and compare configuration values (mirage/irmin#2227, @samoht) - Add a `clear` optional arguments to all function that adds a new commit: `Commit.v`, `set`, `set_tree`, `remove`, `test_and_set`, `test_and_set_tree`, `test_set_and_get`, `test_set_and_get_tree`, `merge`, `merge_tree` and `with_tree`. This new argument allows to control whether the tree caches are cleared up after objects are exported to disk during the commit. (mirage/irmin#2225, @samoht) - **irmin-pack** - Add configuration option, `lower_root`, to specify a path for archiving data during a GC. (mirage/irmin#2177, @metanivek) - Add `is_split_allowed` to check if a store allows split. (mirage/irmin#2175, @metanivek) - Add `add_volume` to allow creating new empty volume in lower layer. (mirage/irmin#2188, @metanivek) - Add a `behaviour` function to the GC to check wether the GC will archive or delete data. (mirage/irmin#2190, @Firobe) - Add a migration on `open_rw` to move the data to the `lower_root` if the configuration was enabled (mirage/irmin#2205, @art-w) ### Changed - **irmin** - Expose type equality for `Schema.Info` to avoid defining the `info` function multiple times when using similar stores (mirage/irmin#2189, mirage/irmin#2193, @samoht) - **irmin-pack** - GC now changes its behaviour depending on the presence of a lower layer. (mirage/irmin#2190, @Firobe) - Split now raises an exception if it is not allowed. It is not allowed on stores that do not allow GC. (mirage/irmin#2175, @metanivek) - GC now supports stores imported V1/V2 stores, in presence of a lower layer only. (mirage/irmin#2190, @art-w, @Firobe) - Upgrade on-disk format to version 5. (mirage/irmin#2184, @metanivek) - Archive to lower volume does not copy orphaned commits. (mirage/irmin#2215, @art-w) ### Fixed - **irmin-pack** - Unhandled exceptions in GC worker process are now reported as a failure (mirage/irmin#2163, @metanivek) - Fix the silent mode for the integrity checks. (mirage/irmin#2179, @icristescu) - Fix file descriptor leak caused by `mmap`. (mirage/irmin#2232, @art-w)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR addresses an issue found while testing the latest octez release candidate.
The ultimate result of the this PR is to disallow split if GC is disallowed, but also includes a commit that fixes the issue in case it is allowed in the future.
Split_disallowed
exception when callingsplit
on a a store that does not allow itStore.is_split_allowed
to check whethersplit
can be called without raising an exceptionsplit
on a store that has statusFrom_v1_v2_post_upgrade
, it would raise anInconsistent_store
exception when attempting to re-open the first chunk as read-only because theend_poff
calculation did not subtract thedead_header_size
. This exception was false; no actual on-disk data corruption had occurred. Thanks to @art-w for the help in investigation and discovery of this root cause. 🙇