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

Fail to do TreeD task for Direct Deals #115

Open
solopine opened this issue Jul 22, 2024 · 3 comments
Open

Fail to do TreeD task for Direct Deals #115

solopine opened this issue Jul 22, 2024 · 3 comments

Comments

@solopine
Copy link

I use Boost and latest main Curio.
When sealing a direct deal, curio failed on TreeD task, the log error is:
2024-07-22T13:20:33.928+0800 WARN stores paths/remote.go:802 reading from remote {"url": "http://10.0.3.47:12300/remote/piece/s-t00-1", "error": "non-200 code: 416", "errorVerbose": "non-200 code: 416:\n github.com/filecoin-project/curio/lib/paths.(*Remote).readRemote\n /root/curio/lib/paths/remote.go:500"}

I check ReaderSeq() function in remote.go (ln 800), there is code:
rd, err := r.readRemote(ctx, url, 0, 0)
The offset and size are both 0, thus the http header "Range" is set to "bytes=0--1", may this leads 416 http error.

@magik6k
Copy link
Collaborator

magik6k commented Jul 22, 2024

Can you describe how you are making the deal?

@solopine
Copy link
Author

solopine commented Jul 22, 2024

I use the command below:
boostd --boost-repo=/fclotus/.boost import-direct --client-addr=**** --allocation-id=*** baga*** /****.car
The command executed successfully.
Curio gets the deal and successfully finished the SDR job, but failed at the next job - TreeD.
The cause I analyses is: Getting remote piece fail, http return 416 code. I don't know why calling readRemote by size=0. Now I am trying to do http-get without range header, and to see if the TreeD job can work well.

@solopine
Copy link
Author

I just changed line 490 of remote.go as belew to skip set range header when size=0, and the TreeD job can go well now.
if size > 0 {
req.Header.Set("Range", fmt.Sprintf("bytes=%d-%d", offset, offset+size-1))
}

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

No branches or pull requests

2 participants