neofs-node icon indicating copy to clipboard operation
neofs-node copied to clipboard

Ensure `StorageID` in metabase is used correctly

Open carpawell opened this issue 7 months ago • 5 comments

Is your feature request related to a problem? Please describe.

I'm always frustrated when we use "dynamic" code. In the storage engine currently, we can accept any (non-empty) storage ID and think that it corresponds to the peapod (or blobovniczas tree earlier). In fact, we now store 1/2 IDs that are left by blobovnizcas (it was a migration mistake or some garbage) and nobody knows it.

Describe the solution you'd like

If a storage ID is unknown, do WARN or ERROR logs. All the storages can be checked additionally. Such a situation is completely erroneous, a metabase must be in sync with a blobstor, no unexpected IDs should be found.

https://github.com/nspcc-dev/neofs-node/blob/e6eeda121646193d248894a9ef25d48dc8b073ad/pkg/local_object_storage/blobstor/get.go#L29-L32

Describe alternatives you've considered

(:

Additional context

I have found blobovnicza tree's IDs in mainnet when looked at https://github.com/nspcc-dev/neofs-node/issues/2844.

carpawell avatar Jul 08 '24 19:07 carpawell