Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rgw: Fix multisite Synchronization failed when read and write delete … #20814

Merged
merged 1 commit into from Apr 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/rgw/rgw_data_sync.cc
Expand Up @@ -2761,6 +2761,9 @@ int RGWBucketShardIncrementalSyncCR::operate()
syncstopped = false;
continue;
}
if (e.op == CLS_RGW_OP_CANCEL) {
continue;
}
if (e.state != CLS_RGW_STATE_COMPLETE) {
continue;
}
Expand Down
3 changes: 3 additions & 0 deletions src/rgw/rgw_op.cc
Expand Up @@ -4403,6 +4403,9 @@ void RGWDeleteObj::execute()
}
}

if (op_ret == -ECANCELED) {
op_ret = 0;
}
if (op_ret == -ERR_PRECONDITION_FAILED && no_precondition_error) {
op_ret = 0;
}
Expand Down
9 changes: 3 additions & 6 deletions src/rgw/rgw_rados.cc
Expand Up @@ -8979,12 +8979,9 @@ int RGWRados::Object::Delete::delete_obj()

store->remove_rgw_head_obj(op);
r = ref.ioctx.operate(ref.oid, &op);
bool need_invalidate = false;
if (r == -ECANCELED) {
/* raced with another operation, we can regard it as removed */
need_invalidate = true;
r = 0;
}

/* raced with another operation, object state is indeterminate */
const bool need_invalidate = (r == -ECANCELED);

int64_t poolid = ref.ioctx.get_id();
if (r >= 0) {
Expand Down