mirror of
https://github.com/ceph/ceph
synced 2025-02-23 02:57:21 +00:00
RadosModel: randomly prefix delete with assert_exists
Signed-off-by: Samuel Just <sjust@redhat.com>
This commit is contained in:
parent
121aa3bc61
commit
4fe7d2abdf
@ -944,7 +944,15 @@ public:
|
||||
interval_set<uint64_t> ranges;
|
||||
context->state_lock.Unlock();
|
||||
|
||||
int r = context->io_ctx.remove(context->prefix+oid);
|
||||
int r = 0;
|
||||
if (rand() % 2) {
|
||||
librados::ObjectWriteOperation op;
|
||||
op.assert_exists();
|
||||
op.remove();
|
||||
r = context->io_ctx.operate(context->prefix+oid, &op);
|
||||
} else {
|
||||
r = context->io_ctx.remove(context->prefix+oid);
|
||||
}
|
||||
if (r && !(r == -ENOENT && !present)) {
|
||||
cerr << "r is " << r << " while deleting " << oid << " and present is " << present << std::endl;
|
||||
assert(0);
|
||||
|
Loading…
Reference in New Issue
Block a user