celestia-node
celestia-node copied to clipboard
bug(share/getter): cascade getter support for ctx without deadline
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