diff options
author | Kotresh HR <khiremat@redhat.com> | 2019-04-23 10:45:25 +0530 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2019-04-24 16:17:39 +0000 |
commit | e0a6941af6ed352911698012ada895d1296b549e (patch) | |
tree | 52e280d632179e7805d68c4f14191468a5a61712 /geo-replication | |
parent | 1b9b0c2db9b54cddf817bde95a43894a91440b35 (diff) |
geo-rep: Fix entries and metadata counters in geo-rep status
Entries counter was incremented twice and decremented only
once. And entries count was being used in place of metadata
entries. This patch fixes both of them.
fixes: bz#1512093
Change-Id: I5601a5fe8d25c9d65b72eb529171e7117ebbb67f
Signed-off-by: Kotresh HR <khiremat@redhat.com>
Diffstat (limited to 'geo-replication')
-rw-r--r-- | geo-replication/syncdaemon/master.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/geo-replication/syncdaemon/master.py b/geo-replication/syncdaemon/master.py index 3da7610eee0..80309f7e052 100644 --- a/geo-replication/syncdaemon/master.py +++ b/geo-replication/syncdaemon/master.py @@ -1170,7 +1170,6 @@ class GMasterChangelogMixin(GMasterCommon): logging.debug('entries: %s' % repr(entries)) # Increment counters for Status - self.status.inc_value("entry", len(entries)) self.files_in_batch += len(datas) self.status.inc_value("data", len(datas)) @@ -1233,10 +1232,10 @@ class GMasterChangelogMixin(GMasterCommon): continue meta_entries.append(edct('META', go=go[0], stat=st)) if meta_entries: - self.status.inc_value("meta", len(entries)) + self.status.inc_value("meta", len(meta_entries)) failures = self.slave.server.meta_ops(meta_entries) self.log_failures(failures, 'go', '', 'META') - self.status.dec_value("meta", len(entries)) + self.status.dec_value("meta", len(meta_entries)) self.batch_stats["META_SYNC_TIME"] += time.time() - meta_start_time |