Skip to content

Commit

Permalink
rbd-mirror: introduce option rbd_mirror_replayer_set_sources_interval
Browse files Browse the repository at this point in the history
Signed-off-by: Dongsheng Yang <dongsheng.yang@easystack.cn>
  • Loading branch information
yangdongsheng committed Nov 9, 2016
1 parent d7fd174 commit 58c3820
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/common/config_opts.h
Expand Up @@ -1297,6 +1297,7 @@ OPTION(rbd_mirror_concurrent_image_syncs, OPT_U32, 5) // maximum number of image
OPTION(rbd_mirror_update_replayers_interval, OPT_INT, 30) // interval to update replayers in rbd-mirror daemon
OPTION(rbd_mirror_deleter_retry_interval, OPT_DOUBLE, 30) // interval to check and retry the failed requests in deleter
OPTION(rbd_mirror_pool_watcher_refresh_images_interval, OPT_INT, 30) // interval to refresh images in pool watcher
OPTION(rbd_mirror_replayer_set_sources_interval, OPT_INT, 30) // interval to get images from pool watcher and set sources in replayer

OPTION(nss_db_path, OPT_STR, "") // path to nss db

Expand Down
3 changes: 2 additions & 1 deletion src/tools/rbd_mirror/Replayer.cc
Expand Up @@ -457,7 +457,8 @@ void Replayer::run()
if (m_blacklisted) {
break;
}
m_cond.WaitInterval(g_ceph_context, m_lock, seconds(30));
m_cond.WaitInterval(g_ceph_context, m_lock,
utime_t(g_ceph_context->_conf->rbd_mirror_replayer_set_sources_interval, 0));
}

ImageIds empty_sources;
Expand Down

0 comments on commit 58c3820

Please sign in to comment.