Skip to content
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

Fix #1360: Efficient pinset status with filters #1377

Merged
merged 1 commit into from Jul 6, 2021

Conversation

hsanjuan
Copy link
Collaborator

@hsanjuan hsanjuan commented Jul 6, 2021

This commit modifies the pintracker StatusAll call to take a status filter.

This allows to skip a PinLs call to ipfs when checking status for items that
are queued, pinning, unpinning or in error. Those status come directly from
the operation tracker. This should result in a significant performance
increase for those calls, particularly in nodes with several hundred thousand
pins and more, where the call to IPFS is very expensive.

A new TrackerStatusUnexpectedlyUnpinned status has been introduce to
differentiate between pin errors (tracked by the operation tracker) and "lost"
items (which before were pin errors too). This new status is handled by the
Recover() operation as before.

Fixes #1360 .

@hsanjuan hsanjuan added this to the Release v0.13.4 milestone Jul 6, 2021
@hsanjuan hsanjuan self-assigned this Jul 6, 2021
@hsanjuan hsanjuan force-pushed the fix/1360-efficient-pin-status branch from 343c943 to 1393eeb Compare July 6, 2021 09:16
This commit modifies the pintracker StatusAll call to take a status filter.

This allows to skip a PinLs call to ipfs when checking status for items that
are queued, pinning, unpinning or in error. Those status come directly from
the operation tracker. This should result in a significant performance
increase for those calls, particularly in nodes with several hundred thousand
pins and more, where the call to IPFS is very expensive.

A new TrackerStatusUnexpectedlyUnpinned status has been introduce to
differentiate between pin errors (tracked by the operation tracker) and "lost"
items (which before were pin errors too). This new status is handled by the
Recover() operation as before.
@hsanjuan hsanjuan force-pushed the fix/1360-efficient-pin-status branch from 1393eeb to edfcfa3 Compare July 6, 2021 09:34
@hsanjuan
Copy link
Collaborator Author

hsanjuan commented Jul 6, 2021

Note: this is an RPC-breaking change. StatusAll calls will no longer work among peers with different versions.

@hsanjuan hsanjuan merged commit 54c3608 into master Jul 6, 2021
@hsanjuan hsanjuan deleted the fix/1360-efficient-pin-status branch July 6, 2021 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement status filtering in PinTracker/Status
1 participant