-
Notifications
You must be signed in to change notification settings - Fork 138
provider: clear provide queue #978
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
Conversation
Codecov ReportAttention: Patch coverage is
@@ Coverage Diff @@
## main #978 +/- ##
==========================================
+ Coverage 61.54% 61.60% +0.05%
==========================================
Files 254 254
Lines 31420 31487 +67
==========================================
+ Hits 19339 19398 +59
- Misses 10503 10507 +4
- Partials 1578 1582 +4
... and 9 files with indirect coverage changes 🚀 New features to boost your workflow:
|
When the currently configured reprovide strategy does not match the previous strategy read from the datastore, then clear the reprovide queue and update the reprovide strategy that is stored in the datastore. Depends on ipfs/boxo#978 Closes #10829
guillaumemichel
left a comment
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.
Looks good and efficient. Flagged a few nits.
This only clears the provide queue though, not the reprovide queue.
There is no proper reprovider queue, the reprovider iterates on the cids returned by the KeyChanFunc. We can cancel the ongoing reprovide operation by cancelling this loop.
It makes sense to give users the opportunity to clear the provide queue, since it is persisted across reboots. Reprovide operations are cancelled on node restart, but if the reprovide strategy doesn't change, the set of cids to be reprovided stays the same, and cannot be cleared by this command. So after the node restarts and waits ReprovideInterval a new reprovide will be triggered.
Co-authored-by: Guillaume Michel <[email protected]>
Co-authored-by: Guillaume Michel <[email protected]>
Co-authored-by: Guillaume Michel <[email protected]>
* provider: clear reprovide queue when reprovide strategy changes When the currently configured reprovide strategy does not match the previous strategy read from the datastore, then clear the reprovide queue and update the reprovide strategy that is stored in the datastore. Depends on ipfs/boxo#978 Closes #10829 * Update docs/changelogs/v0.36.md Co-authored-by: Guillaume Michel <[email protected]> * update log message * update boxo * Move change log to v0.37.md * Add `provide clear` command to clear provide queue The `provide clear` command clears all items from the provide queue and prints out the number of items removed from the queue. The `quiet` option tells the command not to print output. * refactor(cmds): ipfs provide clear moving to new namespace to avoid conflicts, and also document other commands * docs: clarify Reprovider.Strategy * chore: remove undesired md link
No description provided.