celestiaorg / celestiaorg/celestia-node

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

Open
#2,501 0 comments 0 reactions 0 assignees View on GitHub
enhancement
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.