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

Use do not send blocks for pause/resume & prevent processing of blocks on cancelled requests #333

Merged
merged 3 commits into from
Jan 14, 2022

Conversation

hannahhoward
Copy link
Collaborator

@hannahhoward hannahhoward commented Jan 14, 2022

Goals

This PR has two small changes to remove the usage of do-not-send-cids in go-data-transfer

  1. Removes usage of CID lists for graphsync's little known "pause/resume on the requestor side feature" (which works by cancelling and resending requests), moving instead to use do not send first blocks. This is almost surely not being used anyway but now its less unneccesarily memory intensive.
  2. In order to be reliable about whether we're seeing blocks for the first time for go-data-transfer, we need to make sure we don't verify blocks after a request is canceled, so that when data transfer restarts, it seems the same results as from where it left off. This is probably what we should have done anyway... but it's a one line change in our cancel method. See: https://github.com/ipfs/go-graphsync/pull/333/files#diff-71edc89e7b7c1e4f58b00139297dc49e2ddb0671d6adfe0d152d569f6ce8e398L262

Copy link
Member

@rvagg rvagg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clever, 👌 lgtm

@hannahhoward hannahhoward merged commit 98dd895 into main Jan 14, 2022
@mvdan mvdan deleted the feat/use-do-not-send-blocks branch March 7, 2022 11: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.

2 participants