Before, when searching for an object, we iterated over shards and stopped
right after we found the object. Currently, we need to iterate over all
shards, because, when the object and its GC mark are stored separately, we
could find the object earlier than its GC mark.
Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
This function was very obfuscated. I hope the newer version is more
clear, but IMHO it keeps being bad because:
- Its name is confusing because it checks both the graveyard and the
garbage.
- It has no interface. We use that function in several metabase methods,
it just returns some 'magic' uint8 numbers and has no doc comment, I
mean it's ridiculous.
- It checks out for 'the node being in incorrect state' for some reason
but that result isn't used further. I kept a comment about that but it
has no logic for me.
Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
Currently, when an object on some shard is inhumed, the engine places
a tombstone on the same shard. If the target shard is read-only, the
engine fails.
In that case, we want the engine to correctly place a tombstone on
a different shard, ensuring that:
- An object becomes unavailable if a tombstone was placed on a different
shard. See `TestObjectUnavailableIfTombstoneOnDifferentShard` test.
- GC deletes an object if a tombstone was placed on a different shard.
See `TestObjectDeletedIfTombstoneOnDifferentShard` test.
Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>