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

Pre cancel retrievals that will fail due to identical miner and payload CID #207

Merged
merged 2 commits into from
Jun 11, 2021

Conversation

hannahhoward
Copy link
Contributor

@hannahhoward hannahhoward commented Jun 11, 2021

Goals

When a previous retrieval with the same payload CID & miner is stuck and running indefinitely, cancel it before attempting the deal, so the deal doesn't fail.

Implementation

  • Update Lotus (we need a commit sha that has ClientListRetrievals -- not this does for our dealbots to run on almost master code of Lotus -- but the SHA used is the one we're running infra)
  • I also had to pull in a new updated ffi-stub
  • On deal start, list all retrievals, iterate through to check for any that have the same miner (peer.ID) and payloadCID, and cancel them if so -- this is the same logic used internally by go-fil-markets to produce the error so should be reliable

For Discussion

fixes #156

add logic to search for any retrievals with the same peer id and payload CID and cancel them
@hannahhoward hannahhoward merged commit 27fe22a into main Jun 11, 2021
@hannahhoward hannahhoward deleted the feat/pre-cancel-retrieval branch June 11, 2021 22:53
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.

When a retrieval hangs forever, we need to lotus client cancel-retrieval before retry
2 participants