Project

General

Profile

Feature #8562

rgw: Conditional PUT on ETag

Added by Ray Lv almost 5 years ago. Updated over 4 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
-
Start date:
06/08/2014
Due date:
% 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

Revision 7925b82c (diff)
Added by Ray Lv over 4 years ago

rgw: Conditional PUT on ETag

Fixes: #8562

Signed-off-by: Ray Lv <>

History

#1 Updated by Ray Lv over 4 years ago

  • Assignee set to Ray Lv

#2 Updated by Ray Lv over 4 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 Ray Lv over 4 years ago

Closed the previous out-of-synced PR and submitted a new one: https://github.com/ceph/ceph/pull/2756

#4 Updated by Ray Lv over 4 years ago

  • Status changed from New to Need Review

#5 Updated by Yehuda Sadeh over 4 years ago

  • Status changed from Need Review to Resolved

Merged, commit:7925b82c20c94043dd5e4ca69d3ef55ea43db1e0.
Tests commit:3e1e2ee43893264eb9ca2a3fbc581ebe46c06d0e

Also available in: Atom PDF