nspcc-dev / nspcc-dev/neofs-node

Release ants worker pools

Open
#901 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement I4 S2 U3
Dominant language
Go
Stars
38
Forks
51
Avg merge
1d 20h
Merged PRs (30d)
38

Description

Mentioned by @fyrchik in https://github.com/nspcc-dev/neofs-node/pull/899.

We use ants.Pool as an implementation of limited worker pools. Each instance should be closed (Release method) after there is no more need in pool (almost always on application shutdown).

  1. I'd be better to concentrate the implementation of util.WorkerPool interface in a single package (e.g. util/antspool) and use it instead of direct calls like in https://github.com/nspcc-dev/neofs-node/pull/899.
  2. Extend util.WorkerPool interface with io.Closer.
  3. Close all pools in application onShutdown or in Close methods of each component.

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 util.WorkerPool interface and the direct ants.Pool usage referenced in pull request 899. Trace application onShutdown and each component's Close method to identify every pool that needs release. Done means worker-pool creation is concentrated behind util/antspool, the interface includes io.Closer, and all pools are closed during shutdown.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend, distributed-systems
Issue type
Refactor
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.