-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
coreapi
not respecting context timeouts
#9532
Comments
@Jorropo : what are the next steps on this one? |
I have looked this up, the The impact is that if you already have the blocks locally and you are using flatfs to store them, we do not check the context and try to run requests until completion. However things where we really care about Given that there is no support for There is also a world where we do the dirty: select {
case <-ctx.Done():
return nil, ctx.Error()
default:
} In flatfs operations, but I don't really like that either. That only solve the issue if you happen to call with an already terminated context, if the context would expire while the read or write is happening (and not before), then it does nothing. More read about the subject: golang/go#20280 |
Closing given @Jorropo comments in #9532 (comment) |
Checklist
Installation method
built from source
Version
Config
No response
Description
When using the IPFS HTTP RPC (
/api/v0
) client, we set timeouts in the context in the normal go way. But when using the coreapi it doesn’t look like timeouts are respected in the same way. For example, when you do a stat with the coreapi, (I belieive) it goes directly to the filesystem to do that stat, therefore there’s no delay and no timeout applied. Is that correct?In that case, I guess there should still be a timeout somewhere because even when you’re using coreapi it might just take too long to get an object over IPFS. So the question is, where should that timeout now reside?
Context: this test is failing because no timeout is evaluated (and therefore it doesn’t timeout). Previously, when using the HTTP client, the stat would timeout when you set the timeout to 0.
cc: @Jorropo
The text was updated successfully, but these errors were encountered: