nspcc-dev / nspcc-dev/neofs-node

Refactor IR

Open
#2,410 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

discussion enhancement help wanted I4 neofs-ir S1 U4
Dominant language
Go
Stars
38
Forks
51
Avg merge
1d 20h
Merged PRs (30d)
38

Description

Some questions:

  1. Why does it have workers, starters and runners? Also, all of them are anonymous, it makes it difficult to understand what "services" (well, just func ()) are running/will be running.
  2. Why does it read config everywhere, everywhere, everywhere, etc it wants? SN has been using a separate place for config reading for years already. After config is parsed it passes (and modifies its types if need be) in every component that requires it.
  3. Its constructor is 650+ lines long. It does many things (converting types, creating new types, reading configs, making some RPC, logging, filling DB, deciding the full IR work mode in a huge if ... else, etc). I mean that is not bad that everything is happening at the New step, I mean that most of that is done literally inside that func.
  4. https://github.com/nspcc-dev/neofs-node/issues/2309 will require changes that should drop processors, listeners all related things. #2309 says "Each service can do Receive* for things it needs..." but IR has only two services in fact: timers (not services TBH, they only can accept Tick calls and be Reseted), and a Listener that should be dropped. It also makes anything related to https://github.com/nspcc-dev/neofs-node/issues/1337 hard to implement easily.

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 pkg/innerring/innerring.go, focusing on the workers, starters, runners, configuration reads, and the 650+ line constructor referenced in the issue. Compare its configuration flow with cmd/neofs-node/config.go and review issues #2309 and #1337; the issue needs a concrete decomposition and acceptance criteria before completion can be defined.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
distributed-systems
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.