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. Backport of: > Patch: https://review.gluster.org/22603 > BUG: 1512093 > Change-Id: I5601a5fe8d25c9d65b72eb529171e7117ebbb67f > Signed-off-by: Kotresh HR <khiremat@redhat.com> (cherry picked from commit e0a6941af6ed352911698012ada895d1296b549e) fixes: bz#1709685 Change-Id: I5601a5fe8d25c9d65b72eb529171e7117ebbb67f Signed-off-by: Kotresh HR <khiremat@redhat.com>
This commit is contained in:
parent
84b2d08081
commit
4a4710b810
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user