Actions
Feature #8562
closedrgw: Conditional PUT on ETag
% Done:
0%
Source:
Community (dev)
Tags:
Backport:
Reviewed:
Affected Versions:
Pull request ID:
Description
The object versioning has not been implemented yet in RGW. But there are some use cases that different sources concurrently write to the same item. It introduces lost update issue without object versioning.
Anouther simpler approach for preventing lost updates is the Conditional PUT on ETag and retrying on client side. The behavior conforms to HTTP standard If-Match and If-None-Match
- If-Match: <ETag>, If the entity tag matches the entity tag of the entity that would have been returned in the response to a similar GET request (without the If-Match header) on that resource.
- If-Match: *, The PUT will succeed if the resource exists; otherwise, it will fail.
- If-None-Match: <ETag>, If the entity tag does not match the entity tag of the entity that would have been returned in the response to a similar GET request (without the If-None-Match header) on that resource.
- If-None-Match: *, The PUT will succeed if the resource does not exist; otherwise, it will fail.
Actions