Skip to content

Tombstoned object revival not working #3486

@cthulhu-rider

Description

@cthulhu-rider

Objects are marked as removed via tombstones. Such marks are written in the metabases. #2968 introduced revival op to drop these marks from the storage

Expected Behavior

tombstoned object becomes available on SN after revival

Current Behavior

objects is still to-be-removed if tombstone and object are stored in one shard

Possible Solution

seems like

if associatedWithTypedObject(0, metaCursor, oid.ID(addrKey[cid.Size:]), objectSDK.TypeTombstone) {
return statusTombstoned
}
leads to this. It reads the metadata index, while revival only affects garbage and/or graveyard buckets

Steps to Reproduce (for bugs)

run devenv with single shard at each SN and do the following:

$ neofs-cli object put -r s03.neofs.devenv:8080 -w ../devenv/wallets/wallet.json --cid ByrxPc6gYHPCAhZPEfghuEjTSoAy2VannHFdTgpggGLj --file .gitignore 
Enter password > 
[.gitignore] Object successfully stored
  OID: 9sXQqyGX8pVhSeGdo5HST3bzQhSP5QZbxEWipP2xweG3
  CID: ByrxPc6gYHPCAhZPEfghuEjTSoAy2VannHFdTgpggGLj

$ neofs-cli object delete -r s03.neofs.devenv:8080 -w ../devenv/wallets/wallet.json --cid ByrxPc6gYHPCAhZPEfghuEjTSoAy2VannHFdTgpggGLj --oid 9sXQqyGX8pVhSeGdo5HST3bzQhSP5QZbxEWipP2xweG3
Enter password > 
Object 9sXQqyGX8pVhSeGdo5HST3bzQhSP5QZbxEWipP2xweG3 removed successfully.
  ID: 9pG3fyR6jr9G9kCjSxnhAnmMCuDhBM2FGnU74wJBFxii
  CID: ByrxPc6gYHPCAhZPEfghuEjTSoAy2VannHFdTgpggGLj

$ neofs-cli control object revive -w ../devenv/services/storage/wallet03.json --object ByrxPc6gYHPCAhZPEfghuEjTSoAy2VannHFdTgpggGLj/9sXQqyGX8pVhSeGdo5HST3bzQhSP5QZbxEWipP2xweG3 --endpoint s03.neofs.devenv:8081
Enter password > 
Shard ID: 79bSJ7FLBzgcuSyeLZUTR3
Revival status: successful revival from graveyard, tomb: ByrxPc6gYHPCAhZPEfghuEjTSoAy2VannHFdTgpggGLj/9pG3fyR6jr9G9kCjSxnhAnmMCuDhBM2FGnU74wJBFxii

$ neofs-cli object head -r s03.neofs.devenv:8080 -w ../devenv/wallets/wallet.json --cid ByrxPc6gYHPCAhZPEfghuEjTSoAy2VannHFdTgpggGLj --oid 9sXQqyGX8pVhSeGdo5HST3bzQhSP5QZbxEWipP2xweG3
Enter password >
rpc error: read object header via client: status: code = 2052 message = object already removed

while last command should be OK

Context

#3484 unit tests

Regression

yes

Your Environment

Metadata

Metadata

Assignees

Labels

I4No visible changesS4RoutineU2Seriously plannedbugSomething isn't workingneofs-storageStorage node application issues

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions