Open carpawell opened 4 months ago
BTW, storage indexes hardcoding is also awful to me ([0]
is for FSTree, and [1]
is for peapod and just believe me).
@carpawell SDK is not the best place for this issue :thinking:
Woops
Do we need storage ID at all?
Do we need storage ID at all?
This is how we understand what storage to check (a "small" one (peapod currently) or a "big" one).
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
orERROR
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.