Skip to content

Commit

Permalink
Merge pull request #10523: jewel: rgw: segmentation fault on error_re…
Browse files Browse the repository at this point in the history
…po in data sync

Reviewed-by: Loic Dachary <ldachary@redhat.com>
  • Loading branch information
Loic Dachary committed Aug 12, 2016
2 parents ef3d5c9 + dc96383 commit 6797461
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/rgw/rgw_data_sync.cc
Expand Up @@ -785,7 +785,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 @@ -826,10 +826,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 6797461

Please sign in to comment.