nspcc-dev / nspcc-dev/neofs-node

NeoFS API RPC handling deadlines

Open
#3,240 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement I4 neofs-storage S2 U3
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:

  1. "normal", up to couple of minutes
  2. huge, e.g. >=1 hour
  3. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.