nspcc-dev / neofs-node

NeoFS is a decentralized distributed object storage integrated with the Neo blockchain
https://fs.neo.org
GNU General Public License v3.0
32 stars 38 forks source link

Engine Get logic shouldn't depend on shard internals #3024

Open roman-khimov opened 1 day ago

roman-khimov commented 1 day ago

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

I'm always frustrated when I look at the code added in #1199 to fix #1186:

Describe the solution you'd like

I'd like to revert it and get back to the simple logic of:

The answer is not that obvious, testing against the blobstor is expensive, but most of the time we expect it to succeed anyway because we're going to the most probable shard and with fstree it's basically an FS path check, a single syscall. Going into meta is some memory reads which is cheaper in general, but meta is a contention point for many operations, so what happens under which load is an open question.

Describe alternatives you've considered

Corrupted meta can be fixed in the background, btw. We have background routines that go over data, they can check meta consistency and fix it (both ways, get missing object if we have meta or add meta if we have an object).