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
API: Allow user to set peer allocations for pinning #647
Conversation
d4a7c8c
to
336e639
Compare
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.
Will need client and api tests (I don't remember if ipfscluster_test.go
does something with priority allocations, but I would expect so since I think they are used in sharding.
cmd/ipfs-cluster-ctl/main.go
Outdated
`, | ||
ArgsUsage: "<CID>", | ||
Flags: []cli.Flag{ | ||
cli.StringFlag{ |
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.
Move flag after replication factor.
Per the PinPath PR, I'm thinking how to best integrate Allocations as part of PinOptions. One way would be to move Another way would be to add a Therefore, for the moment, I'm leaning towards the latter option. Also, keeping separate user-selected allocations and system-given ones seems useful as it allows us to compare if the requested ones were fulfilled. |
I just checked and |
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.
@hsanjuan has already said all that needs to be said at this point.
@hsanjuan |
336e639
to
fd43026
Compare
`allocations` will be a comma-separated list of peer IDs on which we want to pin. Peers in allocations are prioritized over automatically-determined ones, but replication factors would stil be respected.
fd43026
to
c578644
Compare
The allocator code will choose enough allocations to satisfy the replication factor. Replication factor has priority. |
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.
LGTM. Thanks!
Let's wait for #681 to be merged. |
License: MIT Signed-off-by: Hector Sanjuan <hector@protocol.ai>
Added support for
allocations
query value inPOST /pins/<cid>
endpoint
allocations
will be a comma-separated list of peer ids to which we wantto pin.
allocations
will be prioritized over other query values of similareffect such as replication factor, replication factor min and
replication factor max
Fixes #646