Feature #8562
rgw: 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.
Associated revisions
History
#1 Updated by Xiangyu Lv over 6 years ago
- Assignee set to Xiangyu Lv
#2 Updated by Xiangyu Lv about 6 years ago
Here is a PR for discussion purpose: https://github.com/ceph/ceph/pull/2755
We may need to elaborate a bit on it after the solution is clear.
#3 Updated by Xiangyu Lv about 6 years ago
Closed the previous out-of-synced PR and submitted a new one: https://github.com/ceph/ceph/pull/2756
#4 Updated by Xiangyu Lv about 6 years ago
- Status changed from New to Fix Under Review
#5 Updated by Yehuda Sadeh about 6 years ago
- Status changed from Fix Under Review to Resolved
Merged, commit:7925b82c20c94043dd5e4ca69d3ef55ea43db1e0.
Tests commit:3e1e2ee43893264eb9ca2a3fbc581ebe46c06d0e