node: Refactor using StorageEngine in Object service #768

Open
opened 2025-12-28 17:20:38 +00:00 by sami · 0 comments
Owner

Originally created by @cthulhu-rider on GitHub (Oct 4, 2022).

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

nspcc-dev/neofs-node@4eb0ed11f8/pkg/services/object/put/local.go (L11-L16)

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.

Originally created by @cthulhu-rider on GitHub (Oct 4, 2022). 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 https://github.com/nspcc-dev/neofs-node/blob/4eb0ed11f8e56beee3dfbee632cb4b9cad3bb47c/pkg/services/object/put/local.go#L11-L16 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.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nspcc-dev/neofs-node#768
No description provided.