summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--geo-replication/syncdaemon/gsyncd.py2
-rw-r--r--geo-replication/syncdaemon/master.py9
-rw-r--r--geo-replication/syncdaemon/monitor.py12
-rw-r--r--geo-replication/syncdaemon/resource.py7
4 files changed, 13 insertions, 17 deletions
diff --git a/geo-replication/syncdaemon/gsyncd.py b/geo-replication/syncdaemon/gsyncd.py
index ef6db744e46..759052ec153 100644
--- a/geo-replication/syncdaemon/gsyncd.py
+++ b/geo-replication/syncdaemon/gsyncd.py
@@ -358,7 +358,7 @@ def main_i():
action='callback', callback=store_local_curry('canon'))
op.add_option('--canonicalize-escape-url', dest='url_print',
action='callback', callback=store_local_curry('canon_esc'))
- op.add_option('--is-coldtier', default=False, action='store_true')
+ op.add_option('--is-hottier', default=False, action='store_true')
tunables = [norm(o.get_opt_string()[2:])
for o in op.option_list
diff --git a/geo-replication/syncdaemon/master.py b/geo-replication/syncdaemon/master.py
index eadf51d3e5b..38b9d9c9fc9 100644
--- a/geo-replication/syncdaemon/master.py
+++ b/geo-replication/syncdaemon/master.py
@@ -828,10 +828,11 @@ class GMasterChangelogMixin(GMasterCommon):
et = e[self.IDX_START:self.IDX_END] # entry type
ec = e[self.IDX_END:].split(' ') # rest of the bits
- # skip ENTRY operation if cold tier brick
- if self.name == 'live_changelog':
- if boolify(gconf.is_coldtier) and et == self.TYPE_ENTRY:
- logging.debug('skip ENTRY op: %s if cold tier brick'
+ # skip ENTRY operation if hot tier brick
+ if self.name == 'live_changelog' or \
+ self.name == 'history_changelog':
+ if boolify(gconf.is_hottier) and et == self.TYPE_ENTRY:
+ logging.debug('skip ENTRY op: %s if hot tier brick'
% (ec[self.POS_TYPE]))
continue
diff --git a/geo-replication/syncdaemon/monitor.py b/geo-replication/syncdaemon/monitor.py
index 5a6bf5033a4..cfffe9f88bd 100644
--- a/geo-replication/syncdaemon/monitor.py
+++ b/geo-replication/syncdaemon/monitor.py
@@ -99,9 +99,9 @@ class Volinfo(object):
def get(self, elem):
return self.tree.findall('.//' + elem)
- def is_cold(self, brickpath):
+ def is_hot(self, brickpath):
logging.debug('brickpath: ' + repr(brickpath))
- return brickpath in self.cold_bricks
+ return brickpath in self.hot_bricks
@property
@memoize
@@ -133,8 +133,8 @@ class Volinfo(object):
@property
@memoize
- def cold_bricks(self):
- return [b.text for b in self.get('coldBricks/brick')]
+ def hot_bricks(self):
+ return [b.text for b in self.get('hotBricks/brick')]
class Monitor(object):
@@ -269,7 +269,7 @@ class Monitor(object):
','.join([str(rw), str(ww),
str(ra), str(wa)]),
'--subvol-num', str(w[2])] +
- (['--is-coldtier'] if w[3] else []) +
+ (['--is-hottier'] if w[3] else []) +
['--resource-remote', remote_host])
cpids.add(cpid)
@@ -420,7 +420,7 @@ def distribute(*resources):
workerspex = [(brick['dir'], slaves[idx % len(slaves)],
get_subvol_num(idx, mvol.replica_count, mvol.disperse_count),
- mvol.is_cold(":".join([brick['host'], brick['dir']])))
+ mvol.is_hot(":".join([brick['host'], brick['dir']])))
for idx, brick in enumerate(mvol.bricks)
if is_host_local(brick['host'])]
logging.info('worker specs: ' + repr(workerspex))
diff --git a/geo-replication/syncdaemon/resource.py b/geo-replication/syncdaemon/resource.py
index 1b50caba01a..0573acce3e7 100644
--- a/geo-replication/syncdaemon/resource.py
+++ b/geo-replication/syncdaemon/resource.py
@@ -1434,12 +1434,7 @@ class GLUSTER(AbstractUrl, SlaveLocal, SlaveRemote):
# Note: if config.change_detector is xsync then
# it will not use changelog history api
try:
- # if cold brick type, avoid changeloghistory and use xsync
- if (boolify(gconf.is_coldtier)):
- logging.info("cold tier using xsync crawl")
- g1.crawlwrap(oneshot=True)
- else:
- g3.crawlwrap(oneshot=True)
+ g3.crawlwrap(oneshot=True)
except PartialHistoryAvailable as e:
logging.info('Partial history available, using xsync crawl'
' after consuming history till %s' % str(e))