887953
From 23dda42f6fa9fe0e6def1b6b0cef8dfdd9a5dcb3 Mon Sep 17 00:00:00 2001
887953
From: Milind Changire <mchangir@redhat.com>
887953
Date: Mon, 5 Nov 2018 15:02:36 +0530
887953
Subject: [PATCH 413/444] glusterfind: add logs to identify parsing phases
887953
887953
Add logs to idenitfy start and finish of changelog parsing phases.
887953
887953
mainline:
887953
> fixes: bz#1632236
887953
> Reviewed-on: https://review.gluster.org/c/glusterfs/+/21262
887953
> Change-Id: Id250231f2af7829f887401d30ac98875ae1ae793
887953
> Signed-off-by: Milind Changire <mchangir@redhat.com>
887953
887953
Change-Id: Id250231f2af7829f887401d30ac98875ae1ae793
887953
BUG: 1631166
887953
Signed-off-by: Milind Changire <mchangir@redhat.com>
887953
Reviewed-on: https://code.engineering.redhat.com/gerrit/154905
887953
Tested-by: RHGS Build Bot <nigelb@redhat.com>
887953
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
887953
---
887953
 tools/glusterfind/src/changelog.py | 10 ++++++++++
887953
 1 file changed, 10 insertions(+)
887953
887953
diff --git a/tools/glusterfind/src/changelog.py b/tools/glusterfind/src/changelog.py
887953
index 2376af2..8354cc9 100644
887953
--- a/tools/glusterfind/src/changelog.py
887953
+++ b/tools/glusterfind/src/changelog.py
887953
@@ -273,6 +273,7 @@ def get_changes(brick, hash_dir, log_file, start, end, args):
887953
         fail("%s: %s Historical Changelogs not available: %s" %
887953
              (args.node, brick, e), logger=logger)
887953
 
887953
+    logger.info("[1/4] Starting changelog parsing ...")
887953
     try:
887953
         # scan followed by getchanges till scan returns zero.
887953
         # history_scan() is blocking call, till it gets the number
887953
@@ -301,18 +302,27 @@ def get_changes(brick, hash_dir, log_file, start, end, args):
887953
         fail("%s Error during Changelog Crawl: %s" % (brick, e),
887953
              logger=logger)
887953
 
887953
+    logger.info("[1/4] Finished changelog parsing.")
887953
+
887953
     # Convert all pgfid available from Changelogs
887953
+    logger.info("[2/4] Starting 'pgfid to path' conversions ...")
887953
     pgfid_to_path(brick, changelog_data)
887953
     changelog_data.commit()
887953
+    logger.info("[2/4] Finished 'pgfid to path' conversions.")
887953
 
887953
     # Convert all GFIDs for which no other additional details available
887953
+    logger.info("[3/4] Starting 'gfid to path using pgfid' conversions ...")
887953
     gfid_to_path_using_pgfid(brick, changelog_data, args)
887953
     changelog_data.commit()
887953
+    logger.info("[3/4] Finished 'gfid to path using pgfid' conversions.")
887953
 
887953
     # If some GFIDs fail to get converted from previous step,
887953
     # convert using find
887953
+    logger.info("[4/4] Starting 'gfid to path using batchfind' "
887953
+                "conversions ...")
887953
     gfid_to_path_using_batchfind(brick, changelog_data)
887953
     changelog_data.commit()
887953
+    logger.info("[4/4] Finished 'gfid to path using batchfind' conversions.")
887953
 
887953
     return actual_end
887953
 
887953
-- 
887953
1.8.3.1
887953