Project

General

Profile

Actions

Feature #8562

closed
XL XL

rgw: Conditional PUT on ETag

Feature #8562: rgw: Conditional PUT on ETag

Added by Xiangyu Lv over 12 years ago. Updated almost 12 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
-
Due date:
% Done:

0%

Source:
Community (dev)
Backport:
Reviewed:
Affected Versions:
Pull request ID:
Tags (freeform):
Merge Commit:
Fixed In:
Released In:
Upkeep Timestamp:

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.

XL Updated by Xiangyu Lv about 12 years ago Actions #1

  • Assignee set to Xiangyu Lv

XL Updated by Xiangyu Lv about 12 years ago Actions #2

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.

XL Updated by Xiangyu Lv about 12 years ago Actions #3

XL Updated by Xiangyu Lv about 12 years ago Actions #4

  • Status changed from New to Fix Under Review

YS Updated by Yehuda Sadeh almost 12 years ago Actions #5

  • Status changed from Fix Under Review to Resolved

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

Actions

Also available in: PDF Atom