Skip to content

Commit 4d5b2cd

Browse files
authored
Merge pull request ceph#52568 from smanjara/wip-rgw-mdlog-polling
rgw/multisite: metadata polling event based on unmodified mdlog_marker
2 parents 9239b4b + bae10f2 commit 4d5b2cd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/rgw/driver/rados/rgw_sync.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1481,6 +1481,7 @@ class RGWMetaSyncShardCR : public RGWCoroutine {
14811481
bool done_with_period = false;
14821482

14831483
int total_entries = 0;
1484+
string old_mdlog_marker;
14841485

14851486
RGWSyncTraceNodeRef tn;
14861487
public:
@@ -1832,6 +1833,7 @@ class RGWMetaSyncShardCR : public RGWCoroutine {
18321833
if (mdlog_marker <= max_marker || !truncated) {
18331834
/* we're at the tip, try to bring more entries */
18341835
ldpp_dout(sync_env->dpp, 20) << __func__ << ":" << __LINE__ << ": shard_id=" << shard_id << " syncing mdlog for shard_id=" << shard_id << dendl;
1836+
old_mdlog_marker = mdlog_marker;
18351837
yield call(new RGWCloneMetaLogCoroutine(sync_env, mdlog,
18361838
period, shard_id,
18371839
mdlog_marker, &mdlog_marker));
@@ -1902,7 +1904,8 @@ class RGWMetaSyncShardCR : public RGWCoroutine {
19021904
tn->log(10, SSTR(*this << ": done with period"));
19031905
break;
19041906
}
1905-
if (mdlog_marker == max_marker && can_adjust_marker) {
1907+
if (mdlog_marker == old_mdlog_marker && can_adjust_marker) {
1908+
tn->log(20, SSTR("mdlog_marker=" << mdlog_marker << " old_mdlog_marker=" << old_mdlog_marker));
19061909
tn->unset_flag(RGW_SNS_FLAG_ACTIVE);
19071910
yield wait(utime_t(cct->_conf->rgw_meta_sync_poll_interval, 0));
19081911
}

0 commit comments

Comments
 (0)