Object expiration data in the tree service #141

Open
opened 2023-06-14 14:04:43 +00:00 by alexvanin · 4 comments

S3 Gateway provides a possibility to set an expiration for the objects. However the tree service and object service are not synced in the storage node. So expired object will not be removed from tree service, which may lead to unexpected listing results.

Describe the solution you'd like

Store expiration epoch of the object in the tree and ignore expired objects during listing.

Describe alternatives you've considered

Synchronize tree and object services in the node, which is not quite possible right now.

## Is your feature request related to a problem? Please describe. S3 Gateway provides a possibility to set an expiration for the objects. However the tree service and object service are not synced in the storage node. So expired object will not be removed from tree service, which may lead to unexpected listing results. ## Describe the solution you'd like Store expiration epoch of the object in the tree and ignore expired objects during listing. ## Describe alternatives you've considered Synchronize tree and object services in the node, which is not quite possible right now.
Poster
Owner

So expired object will not be removed from tree service, which may lead to unexpected listing results.

Maybe it shouldn't because gateway sends HEAD requests during listing. But anyway we are going to have dead records in the tree, which isn't a great thing.

Gateway can remove expired objects from the tree every time it sees it.

> So expired object will not be removed from tree service, which may lead to unexpected listing results. Maybe it shouldn't because gateway sends HEAD requests during listing. But anyway we are going to have dead records in the tree, which isn't a great thing. Gateway can remove expired objects from the tree every time it sees it.

It is necessary to provide for such a scenario: there is an object with a expireAt=10, it is blocked by a lock with expireAt=20. Then the object will actually be deleted at epoch 20, not 10.
There may also be several locks with different expireAt.

It is necessary to provide for such a scenario: there is an object with a expireAt=10, it is blocked by a lock with expireAt=20. Then the object will actually be deleted at epoch 20, not 10. There may also be several locks with different expireAt.
Poster
Owner

@dkirillov please look at this in the case of #294.

I don't think S3 Gateway works with neither lock or expiration objects right now. If it does, then consider adding some more data to the tree nodes.

@dkirillov please look at this in the case of #294. I don't think S3 Gateway works with neither lock or expiration objects right now. If it does, then consider adding some more data to the tree nodes.
dkirillov was assigned by alexvanin 2024-01-29 06:48:24 +00:00
Collaborator

S3 Gateway doesn't work with expiration of user-uploaded object rigth now (we have #42 for that).
For locks the situation is little different:

  • we can add lock for object (but we cannot manually delete this: therefore for retention lock we have to wait until lock is expired but if legal hold is set then the object is locked forever)
S3 Gateway doesn't work with expiration of user-uploaded object rigth now (we have #42 for that). For locks the situation is little different: * we can add lock for object (but we cannot manually delete this: therefore for retention lock we have to wait until lock is expired but if legal hold is set then the object is locked forever)
Sign in to join this conversation.
No Milestone
No Assignees
3 Participants
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-s3-gw#141
There is no content yet.