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

Open
opened 2025-12-28 17:22:28 +00:00 by sami · 1 comment
Owner

Originally created by @roman-khimov on GitHub (Nov 21, 2024).

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

  • it's very specific, the case of "meta exists elsewhere" is handled, but things like "meta doesn't exist while the object is present" is no
  • it leaks shard internals to engine, engine should not care about metabases, it just tries to Get something
  • it adds some overhead

Describe the solution you'd like

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

  • either we have a metabase and then we trust it
  • or we never trust it for Gets and always get down to the blobstor itself

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).

Originally created by @roman-khimov on GitHub (Nov 21, 2024). ## 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: * it's very specific, the case of "meta exists elsewhere" is handled, but things like "meta doesn't exist while the object is present" is no * it leaks shard internals to engine, engine should not care about metabases, it just tries to Get something * it adds some overhead ## Describe the solution you'd like I'd like to revert it and get back to the simple logic of: * either we have a metabase and then we trust it * or we never trust it for Gets and always get down to the blobstor itself 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).
Author
Owner

@roman-khimov commented on GitHub (Nov 26, 2024):

Related to #394.

@roman-khimov commented on GitHub (Nov 26, 2024): Related to #394.
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#1288
No description provided.