celestiaorg / celestiaorg/celestia-node
bug(share/getter): cascade getter support for ctx without deadline
- Dominant language
- Go
- Stars
- 996
- Forks
- 1.1k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 34
Description
### Implementation ideas
Current implementation of `cascade.Getter` uses context deadline to identify when to cancel each getter. If no deadline is set on parent context, each of sub-getter will run without deadline. It will mean that if some getter does internal retries, it will not allow any other getters to run, since it will never stop until parent context is canceled.
In current usage of cascade getter it will mean, if context deadline is not set, it will never try `ipld.Getter`.
Quick fix could be to rely on internal `ctxWithSplitTimeout` logic and set minTimeout to non-zero value, that will limit every sub-getter call with `minTimeout`.
Proper solution would be to to implement idea described in https://github.com/celestiaorg/celestia-node/issues/1635
Contributor guide
Assessment
This issue has not been assessed yet.