celestia-node icon indicating copy to clipboard operation
celestia-node copied to clipboard

bug(share/getter): cascade getter support for ctx without deadline

Open walldiss opened this issue 1 year ago • 0 comments

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

walldiss avatar Jul 19 '23 09:07 walldiss