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
31 stars 38 forks source link

Helper object for newbie nodes/shards #2015

Open carpawell opened 1 year ago

carpawell commented 1 year ago

Context

We really rely on our sorting algorithm in some of our subsystems, e.g. we try to place objects in the most appropriate shards, and nodes.

Problem

I could imagine some sort of scenario when adding a new node/shard breaks sorting (that is not bad by itself) and could lead to unexpected object removal/keeping in storage:

  1. Broadcasting LOCK object was done when a container node was not expected to store an object and the node wrote locking info in the shard it thought should store the object. Change container node and shard order -> probability to write the object (and a potential TS for it) in another shard -> unexpected removal.
  2. Shard was RO -> locking/TS info came to not expected shard, will not be handled correctly when an object comes to that shard -> unexpected removal.
  3. Node was added after TS/LOCK objects creation, -> in the replication process that node could accept TS/LOCK objects before their objects and, therefore, could place them to a different shard -> unexpected removal.
  4. Metabase resync without real TS/LOCK object storing will erase that info.
  5. ...

Ideas

fyrchik commented 1 year ago

Why is this an epic?

carpawell commented 1 year ago

@fyrchik, it affects more than one component. I expect to create some set of issues and link them with that epic. But after a discussion.

fyrchik commented 1 year ago
  1. Let's try to perform some checks at the engine level before PUT (check tombstone) and DELETE (check lock objects).
  2. Let's think about storing TOMBSTONE/LOCK objects on each container node.
  3. Write use-cases for a MoveTo operation implementation.