nspcc-dev / nspcc-dev/neofs-node
node: Refactor using `StorageEngine` in `Object` service
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 38
- Forks
- 51
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 38
Description
Object service server of storage node uses engine.StorageEngine type directly almost everywhere. Such code architecture doesn't allow to tune local storage behavior. For example, in #1798 there was a need to block all local operations, but on Object server only: Control service should still call the engine.
I propose to refactor engine's usage as it done it ObjectService.Put server
Each component should precisely document expected behavior of local object storage by itself via locally defined interface. As a bonus, instance can be easily mocked for testing.
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 ObjectService.Put implementation in pkg/services/object/put/local.go, then locate the other Object service uses of engine.StorageEngine. Define locally scoped interfaces that document each component's expected local-storage behavior, replace direct engine usage, and ensure the interfaces can be mocked for testing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- distributed-systems
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100