This is an automated email from the ASF dual-hosted git repository.

hxd pushed a commit to branch iotdb-726
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git


The following commit(s) were added to refs/heads/iotdb-726 by this push:
     new b8f60b5  add debug log for testing time cost of deserialize from 
snapshot and mlog
b8f60b5 is described below

commit b8f60b55245cce83d66c1824338ee8fef80ea227
Author: xiangdong huang <[email protected]>
AuthorDate: Tue Jun 23 17:52:22 2020 +0800

    add debug log for testing time cost of deserialize from snapshot and mlog
---
 server/src/main/java/org/apache/iotdb/db/metadata/MManager.java | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/server/src/main/java/org/apache/iotdb/db/metadata/MManager.java 
b/server/src/main/java/org/apache/iotdb/db/metadata/MManager.java
index 3cd2ac4..103503c 100644
--- a/server/src/main/java/org/apache/iotdb/db/metadata/MManager.java
+++ b/server/src/main/java/org/apache/iotdb/db/metadata/MManager.java
@@ -241,12 +241,16 @@ public class MManager {
     }
 
     File mtreeSnapshot = SystemFileFactory.INSTANCE.getFile(mtreeSnapshotPath);
+    long time = System.currentTimeMillis();
     if (!mtreeSnapshot.exists()) {
       mtree = new MTree();
     } else {
       mtree = MTree.deserializeFrom(mtreeSnapshot);
       lastSnapshotLogLineNumber = mtree.getSnapshotLineNumber();
     }
+    logger.debug("spend {} ms to deserialize mtree from snapshot", 
System.currentTimeMillis() - time);
+
+    time = System.currentTimeMillis();
     // init the metadata from the operation log
     if (logFile.exists()) {
       int idx = 0;
@@ -271,6 +275,7 @@ public class MManager {
           }
         }
       }
+      logger.debug("spend {} ms to deserialize mtree from mlog.txt", 
System.currentTimeMillis() - time);
       return idx;
     } else if (mtreeSnapshot.exists()) {
       throw new IOException("mtree snapshot file exists but mlog.txt does not 
exist.");

Reply via email to