Unify status usage in storage engine when object is missing #1263

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

Originally created by @carpawell on GitHub (Oct 1, 2024).

I'm always frustrated when we have both bool flags that mean the presence of an object in the engine and ErrObjectNotFound. Sometimes it is a flag and sometimes it is an error.

Describe the solution you'd like

It should either be error, or be a flag.

Describe alternatives you've considered

-

Additional context

Sometimes it is ok to have an error and sometimes we only accept a flag, it is unreliable.
As for me, I wouldn't say I like using client statuses (that is where they are placed in SDK) in engines at all.

Originally created by @carpawell on GitHub (Oct 1, 2024). ## Is your feature request related to a problem? Please describe. I'm always frustrated when we have both `bool` flags that mean the presence of an object in the engine and `ErrObjectNotFound`. Sometimes it is a flag and sometimes it is an error. ## Describe the solution you'd like It should either be error, or be a flag. ## Describe alternatives you've considered \- ## Additional context Sometimes it is ok to have [an error](https://github.com/nspcc-dev/neofs-node/blob/fd9a0d6c8b61640a6c138406f026f0568fcac7c5/pkg/local_object_storage/blobstor/fstree/fstree.go#L338) and sometimes we only accept [a flag](https://github.com/nspcc-dev/neofs-node/blob/fd9a0d6c8b61640a6c138406f026f0568fcac7c5/pkg/local_object_storage/shard/get.go#L116-L120), it is unreliable. As for me, I wouldn't say I like using client statuses (that is where they are placed in SDK) in engines at all.
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#1263
No description provided.