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>
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;
}