diff options
author | Kotresh HR <khiremat@redhat.com> | 2014-09-08 15:04:15 +0530 |
---|---|---|
committer | Venky Shankar <vshankar@redhat.com> | 2014-10-27 06:41:09 -0700 |
commit | 5c6e88320489d789fcd026bed72009b0806fe314 (patch) | |
tree | d230917b6cf16e298d1d5aba1ffc3b1b06e564b7 /xlators/mgmt | |
parent | 378a0a19d95e552220d71b13be685f4772c576cd (diff) |
geo-rep/glusterd: Enable changelog and marker during geo-rep create.
PROBLEM:
Geo-rep misses few a files to sync when I/O happenned during
geo-rep start.
ANALYSES:
To use the available changelogs to handle deletes/renames,
'xsync upper limit' is introduced which limits the xsync
crawl till the changelog register time. But there is a
small time interval between the changelog register time and
the time changelog actually enabled. If there is I/O between
this interval, it will not be synced through xsync as it is
beyond changelog register time and not through changelog also
as changelog is not actually enabled.
SOLUTION:
Enable changelog and marker during geo-rep create instead
of geo-rep start so that entries are captured in changelog
and above said interval is nullified.
Change-Id: Ic5f0457a4b67a335cbbb37d34db5f8cb8bc901c4
BUG: 1139196
Signed-off-by: Kotresh HR <khiremat@redhat.com>
Reviewed-on: http://review.gluster.org/8650
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Aravinda VK <avishwan@redhat.com>
Reviewed-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
Tested-by: Venky Shankar <vshankar@redhat.com>
Diffstat (limited to 'xlators/mgmt')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-geo-rep.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c index a160314134e..8496327443c 100644 --- a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c +++ b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c @@ -4566,16 +4566,6 @@ glusterd_op_gsync_set (dict_t *dict, char **op_errstr, dict_t *rsp_dict) is_force = dict_get_str_boolean (dict, "force", _gf_false); if (type == GF_GSYNC_OPTION_TYPE_START) { - - ret = glusterd_set_gsync_confs (volinfo); - if (ret != 0) { - gf_log (this->name, GF_LOG_WARNING, "marker/changelog" - " start failed"); - *op_errstr = gf_strdup ("Index initialization failed"); - ret = -1; - goto out; - } - /* Add slave to the dict indicating geo-rep session is running*/ ret = dict_set_dynstr_with_alloc (volinfo->gsync_active_slaves, key, "running"); @@ -5345,6 +5335,16 @@ create_essentials: goto out; } + /* Enable marker and changelog */ + ret = glusterd_set_gsync_confs (volinfo); + if (ret != 0) { + gf_log (this->name, GF_LOG_WARNING, "marker/changelog" + " start failed"); + *op_errstr = gf_strdup ("Index initialization failed"); + ret = -1; + goto out; + } + out: GF_FREE (slave_url_buf); gf_log ("", GF_LOG_DEBUG,"Returning %d", ret); |