diff options
author | Yehuda Sadeh <yehuda.sadeh@dreamhost.com> | 2012-02-01 12:55:52 -0800 |
---|---|---|
committer | Yehuda Sadeh <yehuda.sadeh@dreamhost.com> | 2012-02-01 12:58:56 -0800 |
commit | 3353f572f84707fbc0e99a9af2dc48de2d0aa2c9 (patch) | |
tree | c5cbb6f3545f4a89e8915b2259d877ca2f8403de /src/cls_rgw.cc | |
parent | cc40572183bbb9ab74fcd1218434d67f9c1f7323 (diff) | |
download | ceph-3353f572f84707fbc0e99a9af2dc48de2d0aa2c9.tar.gz |
cls_rgw: update bucket index when deleting object (with pending)
Bug #2012. Racing delete with other operations (update or another
delete) failed to update the bucket index.
Signed-off-by: Yehuda Sadeh <yehuda.sadeh@dreamhost.com>
Diffstat (limited to 'src/cls_rgw.cc')
-rw-r--r-- | src/cls_rgw.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/cls_rgw.cc b/src/cls_rgw.cc index 7e5f4de619d..a6b3e736693 100644 --- a/src/cls_rgw.cc +++ b/src/cls_rgw.cc @@ -248,8 +248,14 @@ int rgw_bucket_complete_op(cls_method_context_t hctx, bufferlist *in, bufferlist if (!entry.pending_map.size()) { op_bl.append(CEPH_OSD_TMAP_RM); ::encode(op.name, op_bl); - } else + } else { entry.exists = false; + bufferlist new_key_bl; + ::encode(entry, new_key_bl); + op_bl.append(CEPH_OSD_TMAP_SET); + ::encode(op.name, op_bl); + ::encode(new_key_bl, op_bl); + } } else { return -ENOENT; } |