Skip to content

Commit a191f9a

Browse files
author
Shilpa Jagannath
committed
rgw/multisite: avoid redundant error repo entry logging
in bucket incremental sync, if a generation other than the current generation is requested, we mark it with -EAGAIN and retry in error repo in RGWDataSyncSingleEntry(). within this block, we check if that requested generation is lesser than the current gen, write it to error repo, set -EAGAIN and write it to error repo in the outer function once again. don't duplicate error repo entry addition for this condition. Signed-off-by: Shilpa Jagannath <[email protected]>
1 parent 73a383f commit a191f9a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/rgw/driver/rados/rgw_data_sync.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6044,12 +6044,13 @@ int RGWSyncBucketCR::operate(const DoutPrefixProvider *dpp)
60446044
} else {
60456045
tn->log(20, SSTR("logged prev gen entry (bucket=" << source_bs.bucket << ", shard_id=" << source_bs.shard_id << ", gen=" << current_gen << " in error repo: retcode=" << retcode));
60466046
}
6047-
}
6047+
} else {
60486048
retcode = -EAGAIN;
60496049
tn->log(10, SSTR("ERROR: requested sync of future generation "
60506050
<< *gen << " > " << current_gen
60516051
<< ", returning " << retcode << " for later retry"));
60526052
return set_cr_error(retcode);
6053+
}
60536054
} else if (*gen < current_gen) {
60546055
tn->log(10, SSTR("WARNING: requested sync of past generation "
60556056
<< *gen << " < " << current_gen

0 commit comments

Comments
 (0)