summaryrefslogtreecommitdiffstats
path: root/geo-replication/syncdaemon/syncdutils.py
diff options
context:
space:
mode:
authorSunny Kumar <sunkumar@redhat.com>2019-09-20 09:39:12 +0530
committerKotresh HR <khiremat@redhat.com>2019-09-25 04:46:37 +0000
commit284ecd3ecbfbcc9e7791bacc6305807eb2805fff (patch)
tree979aa4a881818d95ea0897172530be0e43ce08ec /geo-replication/syncdaemon/syncdutils.py
parent0a2870b33d5d0a3cded21ac1e3071e3fde81bbb6 (diff)
geo-rep: performance improvement while syncing renames with existing gfid
Problem: The bug[1] addresses issue of data inconsistency when handling RENAME with existing destination. This fix requires some performance tuning considering this issue occurs in heavy rename workload. Solution: If distribution count for master volume is one do not verify op's on master and go ahead with rename. The performance improvement with this patch can only be observed if master volume has distribution count one. [1]. https://bugzilla.redhat.com/show_bug.cgi?id=1694820 Backport of: > Patch: https://review.gluster.org/23459/ > BUG: 1753857 > Change-Id: I8e9bcd575e7e35f40f9f78b7961c92dee642f47b > Signed-off-by: Sunny Kumar <sunkumar@redhat.com> (cherry picked from commit 30d3608c43be119f75da7798d88b94601dedcb29) Change-Id: I8e9bcd575e7e35f40f9f78b7961c92dee642f47b Signed-off-by: Sunny Kumar <sunkumar@redhat.com> fixes: bz#1755212
Diffstat (limited to 'geo-replication/syncdaemon/syncdutils.py')
-rw-r--r--geo-replication/syncdaemon/syncdutils.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/geo-replication/syncdaemon/syncdutils.py b/geo-replication/syncdaemon/syncdutils.py
index 3f41b5f..d886dd7 100644
--- a/geo-replication/syncdaemon/syncdutils.py
+++ b/geo-replication/syncdaemon/syncdutils.py
@@ -920,6 +920,14 @@ class Volinfo(object):
else:
return int(self.get('disperseCount')[0].text)
+ def distribution_count(self, tier, hot):
+ if (tier and hot):
+ return int(self.get('hotBricks/hotdistCount')[0].text)
+ elif (tier and not hot):
+ return int(self.get('coldBricks/colddistCount')[0].text)
+ else:
+ return int(self.get('distCount')[0].text)
+
@property
@memoize
def hot_bricks(self):
@@ -988,6 +996,9 @@ class VolinfoFromGconf(object):
def disperse_count(self, tier, hot):
return gconf.get("master-disperse-count")
+ def distribution_count(self, tier, hot):
+ return gconf.get("master-distribution-count")
+
@property
@memoize
def hot_bricks(self):