Skip to content

Commit

Permalink
rgw: RGWMetaSyncShardControlCR retries with backoff on all error codes
Browse files Browse the repository at this point in the history
RGWBackoffControlCR only treats EBUSY and EAGAIN as 'temporary' error
codes, with all other errors being fatal when exit_on_error is set

to RGWMetaSyncShardControlCR, a 'fatal' error means that no further sync
is possible on that shard until the gateway restarts

this changes RGWMetaSyncShardControlCR to set exit_on_error to false, so
that it will continue to retry with backoff no matter what error code it
gets

Fixes: http://tracker.ceph.com/issues/19019

Signed-off-by: Casey Bodley <cbodley@redhat.com>
  • Loading branch information
cbodley committed Feb 20, 2017
1 parent 357cea2 commit 3dbc414
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/rgw/rgw_sync.cc
Expand Up @@ -1657,12 +1657,13 @@ class RGWMetaSyncShardControlCR : public RGWBackoffControlCR
rgw_meta_sync_marker sync_marker;
const std::string period_marker;

static constexpr bool exit_on_error = false; // retry on all errors
public:
RGWMetaSyncShardControlCR(RGWMetaSyncEnv *_sync_env, const rgw_bucket& _pool,
const std::string& period, RGWMetadataLog* mdlog,
uint32_t _shard_id, const rgw_meta_sync_marker& _marker,
std::string&& period_marker)
: RGWBackoffControlCR(_sync_env->cct, true), sync_env(_sync_env),
: RGWBackoffControlCR(_sync_env->cct, exit_on_error), sync_env(_sync_env),
pool(_pool), period(period), mdlog(mdlog), shard_id(_shard_id),
sync_marker(_marker), period_marker(std::move(period_marker)) {}

Expand Down

0 comments on commit 3dbc414

Please sign in to comment.