diff options
| -rw-r--r-- | geo-replication/syncdaemon/libgfchangelog.py | 5 | ||||
| -rw-r--r-- | geo-replication/syncdaemon/master.py | 10 | ||||
| -rw-r--r-- | geo-replication/syncdaemon/resource.py | 11 | 
3 files changed, 14 insertions, 12 deletions
diff --git a/geo-replication/syncdaemon/libgfchangelog.py b/geo-replication/syncdaemon/libgfchangelog.py index 099867a511a..e6bfbefd0a6 100644 --- a/geo-replication/syncdaemon/libgfchangelog.py +++ b/geo-replication/syncdaemon/libgfchangelog.py @@ -85,8 +85,9 @@ class Changes(object):          return ret      @classmethod -    def cl_history_changelog(cls, changelog_path, start, end): -        ret = cls._get_api('gf_history_changelog')(changelog_path, start, end) +    def cl_history_changelog(cls, changelog_path, start, end, num_parallel): +        ret = cls._get_api('gf_history_changelog')(changelog_path, start, end, +                                                   num_parallel)          if ret == -1:              cls.raise_changelog_err() diff --git a/geo-replication/syncdaemon/master.py b/geo-replication/syncdaemon/master.py index 3047c99050e..b6a7c894814 100644 --- a/geo-replication/syncdaemon/master.py +++ b/geo-replication/syncdaemon/master.py @@ -1128,19 +1128,12 @@ class GMasterChangelogMixin(GMasterCommon):                  self.process(changes)      def register(self): -        (workdir, logfile) = self.setup_working_dir()          self.sleep_interval = int(gconf.change_interval)          self.changelog_done_func = self.master.server.changelog_done -        # register with the changelog library -        # 9 == log level (DEBUG) -        # 5 == connection retries -        self.master.server.changelog_register(gconf.local_path, -                                              workdir, logfile, 9, 5)  class GMasterChangeloghistoryMixin(GMasterChangelogMixin):      def register(self): -        super(GMasterChangeloghistoryMixin, self).register()          self.changelog_register_time = int(time.time())          self.changelog_done_func = self.master.server.history_changelog_done @@ -1166,7 +1159,8 @@ class GMasterChangeloghistoryMixin(GMasterChangelogMixin):                                        ".glusterfs/changelogs")          ts = self.master.server.history_changelog(changelog_path,                                                    purge_time[0], -                                                  self.changelog_register_time) +                                                  self.changelog_register_time, +                                                  int(gconf.sync_jobs))          # scan followed by getchanges till scan returns zero.          # history_changelog_scan() is blocking call, till it gets the number diff --git a/geo-replication/syncdaemon/resource.py b/geo-replication/syncdaemon/resource.py index f0f6692cae2..185722f5df0 100644 --- a/geo-replication/syncdaemon/resource.py +++ b/geo-replication/syncdaemon/resource.py @@ -685,8 +685,9 @@ class Server(object):          Changes.cl_done(clfile)      @classmethod -    def history_changelog(cls, changelog_path, start, end): -        return Changes.cl_history_changelog(changelog_path, start, end) +    def history_changelog(cls, changelog_path, start, end, num_parallel): +        return Changes.cl_history_changelog(changelog_path, start, end, +                                            num_parallel)      @classmethod      def history_changelog_scan(cls): @@ -1312,6 +1313,12 @@ class GLUSTER(AbstractUrl, SlaveLocal, SlaveRemote):              # g3 ==> changelog History              g1.register()              try: +                (workdir, logfile) = g2.setup_working_dir() +                # register with the changelog library +                # 9 == log level (DEBUG) +                # 5 == connection retries +                brickserver.changelog_register(gconf.local_path, +                                               workdir, logfile, 9, 5)                  g2.register()                  g3.register()              except ChangelogException as e:  | 
