This repository has been archived by the owner on Oct 23, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 161
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
this is implemented using a blockstore alike sharding implementation. for recursive pins, a json Vec<String> is stored and used mostly linearly (eh, something to improve). for direct pins, empty files are used. the pin files have different file extensions. lets see if this works in windows as well.
this allows using the owned permit and more importantly moving it to the threadpool thread, which is not necessarily bound to the task lifetime. there is just one permit per datastore at the moment, but making this per cid for example shouldn't be too difficult. having a global lock will be needed later on, not sure how to implement it though.
koivunej
force-pushed
the
add_fs_pinstore
branch
from
September 4, 2020 14:32
2c8c409
to
eef03b5
Compare
Rebased on top of master now that #357 got merged. |
In hindsight the e2c098c seems quite extra, lets see if I can drop it easily. |
Yeah sadly it's really non-trivial. |
I can move the http stuff and the blockstore splitting out if needed. Not really sure if it is needed. |
aphelionz
approved these changes
Sep 4, 2020
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.
bors r+
Build succeeded: |
bors bot
added a commit
that referenced
this pull request
Sep 4, 2020
360: test: common fs and mem pinstore tests r=aphelionz a=koivunej Continues the long chain of pin PRs from #358. Refactors the previously custom tempdir hack and system polluting repo tests into a macro based which can be re-generated for each datastore implementation. Of course this revealed issues on both fs and mem pinstores but they were more about me not understanding the rules before three implementations :) Lets fix later if we find out more inconsistencies. The macro approach is the only one I can see, looks pretty bad and if there are errors those will be even uglier. Co-authored-by: Joonas Koivunen <joonas@equilibrium.co> Co-authored-by: bors[bot] <26634292+bors[bot]@users.noreply.github.com>
Closed
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Adds filesystem based pin store. See adec0a8 for TL;DR.
Builds upon #357. Only last N commits are new after including 159a1c5. Even windows seems ok. base32lower is used to encode the cid names.
TODO:
The differences to other impls are not explained as I am not sure if I am up to date with the other implementations.