Put object should fail when tombstone exists for OID #1512

Open
opened 2024-11-20 13:34:32 +00:00 by potyarkin · 0 comments
Member

Expected Behavior

After object was deleted while tombstone still exists PUT to the deleted oid should be consistent with subsequent GET/HEAD:

  • Either all operations should succeed: new object is written and becomes available. This would be my preference but as far as I understand this is quite challenging to implement.
  • Or all operations should fail: the same error is returned for PUT as for the subsequent GET/HEAD.

Current Behavior

  • PUT to a deleted object ID appears to be successful. I tested with PutSingle: no errors are returned in (*ResObjectPutSingle).Status() or in error
  • GET/HEAD after the PUT fails with an expected code = 2052 message = object already removed

Steps to Reproduce (for bugs)

  1. PutSingle(oid)
  2. Delete(oid)
  3. PutSingle(oid): same payload and attrs as before, must result in the same OID
  4. Get(oid)/Head(oid)

Currently step 3 succeeds and step 4 fails. They should either both succeed or both fail.

Context

I was trying to save the same object I've recently deleted. For that object to become readable I had to:

  • either wait for object.delete.tombstone_lifetime epochs before saving the object for the second time,
  • or add a meaningless nonce attribute to produce a different oid.

Discussion in private chat.

Regression

No.

Your Environment

  • Version used: frostfs-node v0.43.2
  • Server setup and configuration: custom 7-node cluster
  • Operating System and version (uname -a): Debian 12
## Expected Behavior After object was deleted while tombstone still exists PUT to the deleted oid should be consistent with subsequent GET/HEAD: - Either all operations should succeed: new object is written and becomes available. This would be my preference but as far as I understand this is quite challenging to implement. - Or all operations should fail: the same error is returned for PUT as for the subsequent GET/HEAD. ## Current Behavior - PUT to a deleted object ID appears to be successful. I tested with [PutSingle](https://pkg.go.dev/git.frostfs.info/TrueCloudLab/frostfs-sdk-go/client#Client.ObjectPutSingle): no errors are returned in `(*ResObjectPutSingle).Status()` or in `error` - GET/HEAD after the PUT fails with an expected `code = 2052 message = object already removed` ## Steps to Reproduce (for bugs) 1. PutSingle(oid) 2. Delete(oid) 3. PutSingle(oid): same payload and attrs as before, must result in the same OID 4. Get(oid)/Head(oid) Currently step 3 succeeds and step 4 fails. They should either both succeed or both fail. ## Context I was trying to save the same object I've recently deleted. For that object to become readable I had to: - either wait for `object.delete.tombstone_lifetime` epochs before saving the object for the second time, - or add a meaningless nonce attribute to produce a different oid. Discussion in [private chat](https://chat.yadro.com/yadro/pl/a6b7emyhajbu3reed4r7ta4a5e). ## Regression No. ## Your Environment * Version used: frostfs-node v0.43.2 * Server setup and configuration: custom 7-node cluster * Operating System and version (`uname -a`): Debian 12
potyarkin added the
bug
frostfs-node
P3
triage
labels 2024-11-20 13:34:32 +00:00
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: TrueCloudLab/frostfs-node#1512
No description provided.