Skip to content

Commit

Permalink
Merge pull request #10157 from cbodley/wip-rgw-sync-error-repo
Browse files Browse the repository at this point in the history
rgw: fix error_repo segfault in data sync
  • Loading branch information
cbodley committed Jul 8, 2016
2 parents 299a521 + 2860902 commit 0273d55
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/rgw/rgw_data_sync.cc
Expand Up @@ -865,7 +865,7 @@ class RGWDataSyncSingleEntryCR : public RGWCoroutine {

RGWDataSyncShardMarkerTrack *marker_tracker;

RGWOmapAppend *error_repo;
boost::intrusive_ptr<RGWOmapAppend> error_repo;
bool remove_from_repo;

set<string> keys;
Expand Down Expand Up @@ -906,10 +906,10 @@ class RGWDataSyncSingleEntryCR : public RGWCoroutine {
if (retcode < 0) {
ldout(sync_env->store->ctx(), 0) << "ERROR: failed to log sync failure: retcode=" << retcode << dendl;
}
if (!error_repo->append(raw_key)) {
if (error_repo && !error_repo->append(raw_key)) {
ldout(sync_env->store->ctx(), 0) << "ERROR: failed to log sync failure in error repo: retcode=" << retcode << dendl;
}
} else if (remove_from_repo) {
} else if (error_repo && remove_from_repo) {
keys = {raw_key};
yield call(new RGWRadosRemoveOmapKeysCR(sync_env->store, error_repo->get_pool(), error_repo->get_oid(), keys));
if (retcode < 0) {
Expand Down

0 comments on commit 0273d55

Please sign in to comment.