summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorKotresh HR <khiremat@redhat.com>2014-09-08 15:04:15 +0530
committerVenky Shankar <vshankar@redhat.com>2014-11-12 17:56:59 -0800
commit97f021f37d388f903798d78fbda471efb3fb92c0 (patch)
tree0b3968a1fa0ef9c85e6d3cf3bdf285f9007e0e73 /xlators
parentc5c19a353da77b5c4f00dada26023604b71f3ad7 (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. BUG: 1159205 Change-Id: If5203eb1cfcbde3999f97a5f1a6a1af4875ac358 Reviewed-on: http://review.gluster.org/8650 Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/9023 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Venky Shankar <vshankar@redhat.com> Tested-by: Venky Shankar <vshankar@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-geo-rep.c20
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);