Skip to content

Commit

Permalink
rgw: fix for assertion in RGWMetaSyncCR
Browse files Browse the repository at this point in the history
while testing with multiple gateways per zone, i started seeing
omap-get-keys requests fail with EIO. this led to a failed
'assert(next)' in RGWMetaSyncCR due to a bug in error handling

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

Signed-off-by: Casey Bodley <cbodley@redhat.com>
  • Loading branch information
cbodley committed Aug 16, 2016
1 parent bb5f032 commit 6663408
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/rgw/rgw_sync.cc
Expand Up @@ -1681,6 +1681,7 @@ class RGWMetaSyncCR : public RGWCoroutine {
using StackRef = boost::intrusive_ptr<RGWCoroutinesStack>;
using RefPair = std::pair<ControlCRRef, StackRef>;
map<int, RefPair> shard_crs;
int ret{0};

public:
RGWMetaSyncCR(RGWMetaSyncEnv *_sync_env, RGWPeriodHistory::Cursor cursor,
Expand All @@ -1690,7 +1691,6 @@ class RGWMetaSyncCR : public RGWCoroutine {
cursor(cursor), sync_status(_sync_status) {}

int operate() {
int ret = 0;
reenter(this) {
// loop through one period at a time
for (;;) {
Expand Down Expand Up @@ -1743,7 +1743,10 @@ class RGWMetaSyncCR : public RGWCoroutine {
}
}
// wait for each shard to complete
collect(&ret, NULL);
while (ret == 0 && num_spawned() > 1) {
yield wait_for_child();
collect(&ret, nullptr);
}
drain_all();
{
// drop shard cr refs under lock
Expand Down

0 comments on commit 6663408

Please sign in to comment.