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

Should we fail a retrieval with an identical CID+Selector? #319

Open
hannahhoward opened this issue Jun 16, 2023 · 2 comments
Open

Should we fail a retrieval with an identical CID+Selector? #319

hannahhoward opened this issue Jun 16, 2023 · 2 comments
Assignees

Comments

@hannahhoward
Copy link
Collaborator

Looking through state code, I found this line: https://github.com/filecoin-project/lassie/blob/main/pkg/session/state.go#L132

It looks like if we have two retrievals in progress for the same cid + selector, we fail the second one. BUT does this make sense? I feel like this line comes from our autoretrieve days when it was all going ot the same blockstore. But now it's not. Should we reject these requests just cause another is in progress?

@rvagg
Copy link
Member

rvagg commented Jun 16, 2023

Seems wasteful to let these through, the argument here would be to make this the user's problem I suppose. From an API perspective I guess it is a bit weird "sorry, can't fulfil this request because someone is already doing the same thing". No technical reason anymore that it shouldn't be duplicable I think.

From a technical standpoint I like rejecting duplicates. From a user perspective it probably is a bit weird. So I guess that means we should remove it.

Do we know if it's causing problems in practice?

@hannahhoward
Copy link
Collaborator Author

that's what I'm curious about -- theoretically it shouldn't cause same cid + selector should get responded to from cache if hit twice.... but who knows.

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