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

Don't double count data sent on restart #184

Closed
dirkmc opened this issue Mar 30, 2021 · 0 comments · Fixed by #185
Closed

Don't double count data sent on restart #184

dirkmc opened this issue Mar 30, 2021 · 0 comments · Fixed by #185
Labels
x/ignite Issues and PRs being tracked by Team Ignite at Protocol Labs

Comments

@dirkmc
Copy link
Contributor

dirkmc commented Mar 30, 2021

Background

When a data transfer is restarted, graphsync emits queue events for all blocks in the file a second time.

This results in OnDataQueued calling revalidator.OnPullDataSent(channel ID, size) with repeat values.

In turn this causes double-counting in the accounting for how many bytes have been sent by the provider. Consequently the provider expects payment for data that has not been sent, and the receiver does not send payment. This causes the retrieval to get stuck.

Solution

We should only call revalidator.OnPullDataSent() the first time a particular block is queued - ie don't call it if the block is re-queued due to a restart.

A bug that may be caused by this issue: filecoin-project/lotus#5901

@dirkmc dirkmc added the x/ignite Issues and PRs being tracked by Team Ignite at Protocol Labs label Mar 30, 2021
@dirkmc dirkmc changed the title Double count data sent on restart Don't double count data sent on restart Mar 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
x/ignite Issues and PRs being tracked by Team Ignite at Protocol Labs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant