nspcc-dev / nspcc-dev/neofs-node
NeoFS API RPC handling deadlines
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 38
- Forks
- 51
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 38
Description
Is your feature request related to a problem? Please describe.
currently, all server API handlers rely on the context passed by the gRPC lib side (example). It may have various deadline settings:
- "normal", up to couple of minutes
- huge, e.g. >=1 hour
- unset, i.e. infinite context
for 1, although the "normal" concept is relative here, everything works fine. For 2, although it's finite, the handler may stuck for long time. For 3, the server hands "forever"
Describe the solution you'd like
limit request deadlines. If the deadline exceeds the limit, use the max one. For simplicity, lets have a global value for all RPCs. 1m feels good
Describe alternatives you've considered
not yet
Additional context
#3229
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the server handler example in pkg/services/object/server.go around line 1891, then trace how other server API handlers receive their gRPC contexts. Define where the global request deadline should apply and verify that finite, excessive, and unset deadlines are capped as requested; check issue #3229 for related context.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, grpc
- Domain
- api, distributed-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100