diff options
author | J. Eric Ivancich <ivancich@redhat.com> | 2021-04-14 22:13:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-14 22:13:17 +0200 |
commit | 6710f28746268cc77e3be0e1228844b5764b2a88 (patch) | |
tree | 8ab19efec4dc48c1ff814d6dd2695250c38a14c3 | |
parent | Merge pull request #40821 from cbodley/wip-50218 (diff) | |
parent | rgw: during reshard lock contention, adjust logging (diff) | |
download | ceph-6710f28746268cc77e3be0e1228844b5764b2a88.tar.xz ceph-6710f28746268cc77e3be0e1228844b5764b2a88.zip |
Merge pull request #40862 from ivancich/wip-rgw-reshard-contention-logging
rgw: during reshard lock contention, adjust logging
Reviewed-by: Daniel Gryniewicz <dang@redhat.com>
Reviewed-by: Casey Bodley <cbodley@redhat.com>
-rw-r--r-- | src/rgw/rgw_reshard.cc | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/rgw/rgw_reshard.cc b/src/rgw/rgw_reshard.cc index 9f85814a296..e213918b8eb 100644 --- a/src/rgw/rgw_reshard.cc +++ b/src/rgw/rgw_reshard.cc @@ -472,6 +472,7 @@ RGWBucketReshardLock::RGWBucketReshardLock(rgw::sal::RGWRadosStore* _store, int RGWBucketReshardLock::lock() { internal_lock.set_must_renew(false); + int ret; if (ephemeral) { ret = internal_lock.lock_exclusive_ephemeral(&store->getRados()->reshard_pool_ctx, @@ -479,11 +480,19 @@ int RGWBucketReshardLock::lock() { } else { ret = internal_lock.lock_exclusive(&store->getRados()->reshard_pool_ctx, lock_oid); } - if (ret < 0) { - ldout(store->ctx(), 0) << "RGWReshardLock::" << __func__ << - " failed to acquire lock on " << lock_oid << " ret=" << ret << dendl; + + if (ret == -EBUSY) { + ldout(store->ctx(), 0) << "INFO: RGWReshardLock::" << __func__ << + " found lock on " << lock_oid << + " to be held by another RGW process; skipping for now" << dendl; + return ret; + } else if (ret < 0) { + lderr(store->ctx()) << "ERROR: RGWReshardLock::" << __func__ << + " failed to acquire lock on " << lock_oid << ": " << + cpp_strerror(-ret) << dendl; return ret; } + reset_time(Clock::now()); return 0; |