You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by qi...@apache.org on 2019/06/26 06:35:01 UTC

[incubator-iotdb] branch feature_async_close_tsfile updated: add flush log

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

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


The following commit(s) were added to refs/heads/feature_async_close_tsfile by this push:
     new c7c803f  add flush log
c7c803f is described below

commit c7c803f8d5e89e584e5334ff5d0b967e5e83adcb
Author: qiaojialin <64...@qq.com>
AuthorDate: Wed Jun 26 14:34:44 2019 +0800

    add flush log
---
 iotdb/iotdb/conf/iotdb-engine.properties           | 24 ++++++------
 iotdb/iotdb/conf/tsfile-format.properties          | 10 ++---
 .../iotdb/db/auth/role/LocalFileRoleAccessor.java  |  6 +--
 .../iotdb/db/auth/user/LocalFileUserAccessor.java  | 14 +++----
 .../db/concurrent/IoTDBThreadPoolFactory.java      |  2 +-
 .../java/org/apache/iotdb/db/conf/IoTDBConfig.java | 14 +++----
 .../engine/bufferwrite/BufferWriteProcessor.java   | 12 +++---
 .../bufferwrite/RestorableTsFileIOWriter.java      |  4 +-
 .../engine/cache/RowGroupBlockMetaDataCache.java   |  2 +-
 .../iotdb/db/engine/filenode/FileNodeManager.java  | 44 +++++++++++-----------
 .../db/engine/filenode/FileNodeProcessor.java      | 42 ++++++++++-----------
 .../db/engine/filenodeV2/FileNodeProcessorV2.java  | 25 ++++++++----
 .../iotdb/db/engine/filenodeV2/FlushManager.java   |  2 +-
 .../filenodeV2/UnsealedTsFileProcessorV2.java      |  6 ++-
 .../db/engine/memcontrol/BasicMemController.java   |  2 +-
 .../db/engine/memcontrol/FlushPartialPolicy.java   |  2 +-
 .../db/engine/memcontrol/ForceFLushAllPolicy.java  |  2 +-
 .../iotdb/db/engine/memtable/AbstractMemTable.java |  2 +-
 .../iotdb/db/engine/memtable/MemTablePool.java     | 10 ++---
 .../apache/iotdb/db/monitor/MonitorConstants.java  |  2 +-
 .../org/apache/iotdb/db/monitor/StatMonitor.java   |  4 +-
 .../iotdb/db/monitor/collector/FileSize.java       | 12 +++---
 .../iotdb/db/qp/strategy/PhysicalGenerator.java    |  6 +--
 .../groupby/GroupByWithValueFilterDataSet.java     |  6 +--
 .../db/query/executor/AggregateEngineExecutor.java |  2 +-
 .../java/org/apache/iotdb/db/service/Monitor.java  |  2 +-
 .../java/org/apache/iotdb/db/service/Utils.java    |  4 +-
 .../org/apache/iotdb/db/sync/conf/Constans.java    |  2 +-
 .../java/org/apache/iotdb/db/utils/AuthUtils.java  |  8 ++--
 .../java/org/apache/iotdb/db/utils/FileUtils.java  |  2 +-
 .../java/org/apache/iotdb/db/utils/MemUtils.java   |  6 +--
 .../apache/iotdb/db/utils/PrimitiveArrayList.java  |  4 +-
 .../iotdb/db/utils/PrimitiveArrayListV2.java       |  4 +-
 .../org/apache/iotdb/db/utils/TsPrimitiveType.java |  4 +-
 .../org/apache/iotdb/db/writelog/io/LogWriter.java |  2 +-
 .../iotdb/db/writelog/io/SingleFileLogReader.java  |  2 +-
 .../iotdb/db/monitor/collector/FileSizeTest.java   |  4 +-
 .../org/apache/iotdb/db/sql/SQLParserTest.java     |  2 +-
 .../org/apache/iotdb/db/sync/test/RandomNum.java   |  2 +-
 .../iotdb/db/writelog/IoTDBLogFileSizeTest.java    |  4 +-
 .../apache/iotdb/db/writelog/PerformanceTest.java  |  2 +-
 41 files changed, 162 insertions(+), 149 deletions(-)

diff --git a/iotdb/iotdb/conf/iotdb-engine.properties b/iotdb/iotdb/conf/iotdb-engine.properties
index 4ea8948..deba14a 100644
--- a/iotdb/iotdb/conf/iotdb-engine.properties
+++ b/iotdb/iotdb/conf/iotdb-engine.properties
@@ -53,7 +53,7 @@ force_wal_period_in_ms=10
 # If this property is unset, system will save the data in the default relative path directory under the IoTDB folder(i.e., %IOTDB_HOME%/data/data).
 # If it is absolute, system will save the data in exact location it points to.
 # If it is relative, system will save the data in the relative path directory it indicates under the IoTDB folder.
-# Note: If data_dir is assigned an empty string(i.e.,zero-getTotalDataNumber), it will be handled as a relative path.
+# Note: If data_dir is assigned an empty string(i.e.,zero-size), it will be handled as a relative path.
 # For windows platform
 # If its prefix is a drive specifier followed by "\\", or if its prefix is "\\\\", then the path is absolute. Otherwise, it is relative.
 # data_dir=D:\\iotdb\\data\\data
@@ -66,7 +66,7 @@ force_wal_period_in_ms=10
 # If this property is unset, system will save the TsFiles in the default relative path directory under the data_dir folder(i.e., %IOTDB_HOME%/data/data/settled).
 # If some are absolute, system will save the data in exact location they point to.
 # If some are relative, system will save the data in the relative path directory they indicate under the data_dir folder.
-# Note: If some are assigned an empty string(i.e.,zero-getTotalDataNumber), they will be handled as a relative path.
+# Note: If some are assigned an empty string(i.e.,zero-size), they will be handled as a relative path.
 # For windows platform
 # If its prefix is a drive specifier followed by "\\", or if its prefix is "\\\\", then the path is absolute. Otherwise, it is relative.
 # tsfile_dir=D:\\iotdb\\data\\data,data\\data
@@ -79,7 +79,7 @@ force_wal_period_in_ms=10
 # If this property is unset, system will save the Overflow Files in the default relative path directory under the data_dir folder(i.e., %IOTDB_HOME%/data/data/overflow).
 # If some are absolute, system will save the data in exact location they point to.
 # If some are relative, system will save the data in the relative path directory they indicate under the data_dir folder.
-# Note: If some are assigned an empty string(i.e.,zero-getTotalDataNumber), they will be handled as a relative path.
+# Note: If some are assigned an empty string(i.e.,zero-size), they will be handled as a relative path.
 # For windows platform
 # If its prefix is a drive specifier followed by "\\", or if its prefix is "\\\\", then the path is absolute. Otherwise, it is relative.
 # overflow_dir=D:\\iotdb\\data\\unseq,overflow2
@@ -103,7 +103,7 @@ force_wal_period_in_ms=10
 # If this property is unset, system will save the data in the default relative path directory under the IoTDB folder(i.e., %IOTDB_HOME%/data/system).
 # If it is absolute, system will save the data in exact location it points to.
 # If it is relative, system will save the data in the relative path directory it indicates under the IoTDB folder.
-# Note: If sys_dir is assigned an empty string(i.e.,zero-getTotalDataNumber), it will be handled as a relative path.
+# Note: If sys_dir is assigned an empty string(i.e.,zero-size), it will be handled as a relative path.
 # For windows platform
 # If its prefix is a drive specifier followed by "\\", or if its prefix is "\\\\", then the path is absolute. Otherwise, it is relative.
 # sys_dir=D:\\iotdb\\data\\system
@@ -115,7 +115,7 @@ force_wal_period_in_ms=10
 # If this property is unset, system will save the data in the default relative path directory under the IoTDB folder(i.e., %IOTDB_HOME%/data).
 # If it is absolute, system will save the data in the exact location it points to.
 # If it is relative, system will save the data in the relative path directory it indicates under the IoTDB folder.
-# Note: If wal_dir is assigned an empty string(i.e.,zero-getTotalDataNumber), it will be handled as a relative path.
+# Note: If wal_dir is assigned an empty string(i.e.,zero-size), it will be handled as a relative path.
 # For windows platform
 # If its prefix is a drive specifier followed by "\\", or if its prefix is "\\\\", then the path is absolute. Otherwise, it is relative.
 # wal_dir=D:\\iotdb\\data
@@ -177,21 +177,21 @@ mem_threshold_dangerous=0.6
 mem_monitor_interval_in_ms=1000
 
 # Decide how to control memory used by inserting data.
-# 0 is RecordMemController, which count the getTotalDataNumber of every record (tuple).
+# 0 is RecordMemController, which count the size of every record (tuple).
 # 1 is JVMMemController, which use JVM heap memory as threshold.
 # 2 is DisabledMemController, which does not control memory usage.
 mem_controller_type=0
 
-# When a bufferwrite's metadata getTotalDataNumber (in byte) exceed this, the bufferwrite is forced closed.
+# When a bufferwrite's metadata size (in byte) exceed this, the bufferwrite is forced closed.
 bufferwrite_meta_size_threshold=209715200
 
-# When a bufferwrite's file getTotalDataNumber (in byte) exceeds this, the bufferwrite is forced closed.
+# When a bufferwrite's file size (in byte) exceeds this, the bufferwrite is forced closed.
 bufferwrite_file_size_threshold=2147483648
 
-# When a overflow's metadata getTotalDataNumber (in byte) exceeds this, the overflow is forced closed.
+# When a overflow's metadata size (in byte) exceeds this, the overflow is forced closed.
 overflow_meta_size_threshold=20971520
 
-# When a overflow's file getTotalDataNumber (in byte) exceeds this, the overflow is forced closed.
+# When a overflow's file size (in byte) exceeds this, the overflow is forced closed.
 overflow_file_size_threshold=209715200
 
 # How many thread can concurrently flush. When <= 0, use CPU core number.
@@ -232,11 +232,11 @@ small_flush_interval=60000
 # The threshold of lines of external sort
 external_sort_threshold=50
 
-# cache getTotalDataNumber for MManager.
+# cache size for MManager.
 # This cache is used to improve insert speed where all path check and TSDataType will be cached in MManager with corresponding Path.
 schema_manager_cache_size=300000
 
-# If the getTotalDataNumber in byte of a WAL log exceeds this, it won't be written.
+# If the size in byte of a WAL log exceeds this, it won't be written.
 # Generally the default value 4MB is enough.
 max_log_entry_size=4194304
 
diff --git a/iotdb/iotdb/conf/tsfile-format.properties b/iotdb/iotdb/conf/tsfile-format.properties
index 17593c7..3c5dd5a 100644
--- a/iotdb/iotdb/conf/tsfile-format.properties
+++ b/iotdb/iotdb/conf/tsfile-format.properties
@@ -18,23 +18,23 @@
 #
 
 group_size_in_byte=134217728
-# The memory getTotalDataNumber for each series writer to pack page, default value is 64KB
+# The memory size for each series writer to pack page, default value is 64KB
 page_size_in_byte=65536
 # The maximum number of data points in a page, defalut 1024*1024
 max_number_of_points_in_page=1048576
 # Data type configuration
 # Data type for input timestamp, TsFile supports INT32 or INT64
 time_series_data_type=INT64
-# Max getTotalDataNumber limitation of input string
+# Max size limitation of input string
 max_string_length=128
 # Floating-point precision
 float_precision=2
 # Encoder configuration
-# Encoder of time series, TsFile supports TS_2DIFF, PLAIN and RLE(run-getTotalDataNumber encoding) and default value is TS_2DIFF
+# Encoder of time series, TsFile supports TS_2DIFF, PLAIN and RLE(run-length encoding) and default value is TS_2DIFF
 time_series_encoder=TS_2DIFF
 # Encoder of value series. default value is PLAIN.
-# For int, long data type, TsFile also supports TS_2DIFF and RLE(run-getTotalDataNumber encoding).
-# For float, double data type, TsFile also supports TS_2DIFF, RLE(run-getTotalDataNumber encoding) and GORILLA.
+# For int, long data type, TsFile also supports TS_2DIFF and RLE(run-length encoding).
+# For float, double data type, TsFile also supports TS_2DIFF, RLE(run-length encoding) and GORILLA.
 # For text data type, TsFile only supports PLAIN.
 value_encoder=PLAIN
 # Compression configuration
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/auth/role/LocalFileRoleAccessor.java b/iotdb/src/main/java/org/apache/iotdb/db/auth/role/LocalFileRoleAccessor.java
index 66d593f..0adc30c 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/auth/role/LocalFileRoleAccessor.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/auth/role/LocalFileRoleAccessor.java
@@ -37,11 +37,11 @@ import org.apache.iotdb.db.utils.IOUtils;
 
 /**
  * This class store each role in a separate sequential file. Role file schema : Int32 role name
- * getTotalDataNumber Utf-8 role name bytes Int32 seriesPath privilege number n Int32 seriesPath[1] getTotalDataNumber Utf-8
+ * size Utf-8 role name bytes Int32 seriesPath privilege number n Int32 seriesPath[1] size Utf-8
  * seriesPath[1] bytes Int32 privilege num k1 Int32 privilege[1][1] Int32 privilege[1][2] ... Int32
- * privilege[1][k1] Int32 seriesPath[2] getTotalDataNumber Utf-8 seriesPath[2] bytes Int32 privilege num yk2
+ * privilege[1][k1] Int32 seriesPath[2] size Utf-8 seriesPath[2] bytes Int32 privilege num yk2
  * Int32 privilege[2][1] Int32 privilege[2][2] ... Int32 privilege[2][k2] ... Int32 seriesPath[n]
- * getTotalDataNumber Utf-8 seriesPath[n] bytes Int32 privilege num kn Int32 privilege[n][1] Int32
+ * size Utf-8 seriesPath[n] bytes Int32 privilege num kn Int32 privilege[n][1] Int32
  * privilege[n][2] ... Int32 privilege[n][kn]
  */
 public class LocalFileRoleAccessor implements IRoleAccessor {
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/auth/user/LocalFileUserAccessor.java b/iotdb/src/main/java/org/apache/iotdb/db/auth/user/LocalFileUserAccessor.java
index e25f99f..0acf2b2 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/auth/user/LocalFileUserAccessor.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/auth/user/LocalFileUserAccessor.java
@@ -39,15 +39,15 @@ import org.slf4j.LoggerFactory;
 
 /**
  * This class loads a user's information from the corresponding file.The user file is a sequential
- * file. User file schema: Int32 username bytes getTotalDataNumber Utf-8 username bytes Int32 Password bytes
- * getTotalDataNumber Utf-8 password bytes Int32 seriesPath privilege number n Int32 seriesPath[1] getTotalDataNumber Utf-8
+ * file. User file schema: Int32 username bytes size Utf-8 username bytes Int32 Password bytes
+ * size Utf-8 password bytes Int32 seriesPath privilege number n Int32 seriesPath[1] size Utf-8
  * seriesPath[1] bytes Int32 privilege num k1 Int32 privilege[1][1] Int32 privilege[1][2] ... Int32
- * privilege[1][k1] Int32 seriesPath[2] getTotalDataNumber Utf-8 seriesPath[2] bytes Int32 privilege num k2
+ * privilege[1][k1] Int32 seriesPath[2] size Utf-8 seriesPath[2] bytes Int32 privilege num k2
  * Int32 privilege[2][1] Int32 privilege[2][2] ... Int32 privilege[2][k2] ... Int32 seriesPath[n]
- * getTotalDataNumber Utf-8 seriesPath[n] bytes Int32 privilege num kn Int32 privilege[n][1] Int32
- * privilege[n][2] ... Int32 privilege[n][kn] Int32 user name number m Int32 user name[1] getTotalDataNumber
- * Utf-8 user name[1] bytes Int32 user name[2] getTotalDataNumber Utf-8 user name[2] bytes ... Int32 user
- * name[m] getTotalDataNumber Utf-8 user name[m] bytes
+ * size Utf-8 seriesPath[n] bytes Int32 privilege num kn Int32 privilege[n][1] Int32
+ * privilege[n][2] ... Int32 privilege[n][kn] Int32 user name number m Int32 user name[1] size
+ * Utf-8 user name[1] bytes Int32 user name[2] size Utf-8 user name[2] bytes ... Int32 user
+ * name[m] size Utf-8 user name[m] bytes
  */
 public class LocalFileUserAccessor implements IUserAccessor {
 
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/concurrent/IoTDBThreadPoolFactory.java b/iotdb/src/main/java/org/apache/iotdb/db/concurrent/IoTDBThreadPoolFactory.java
index 545ade0..7399903 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/concurrent/IoTDBThreadPoolFactory.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/concurrent/IoTDBThreadPoolFactory.java
@@ -37,7 +37,7 @@ public class IoTDBThreadPoolFactory {
    * see {@link Executors#newFixedThreadPool(int, java.util.concurrent.ThreadFactory)}.
    *
    * @param poolName - the name of thread pool
-   * @return fixed getTotalDataNumber thread pool
+   * @return fixed size thread pool
    */
   public static ExecutorService newFixedThreadPool(int nthreads, String poolName) {
     return Executors.newFixedThreadPool(nthreads, new IoTThreadFactory(poolName));
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java b/iotdb/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java
index 6e49be9..764a163 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java
@@ -196,24 +196,24 @@ public class IoTDBConfig {
   private long memMonitorInterval = 1000;
   /**
    * Decide how to control memory usage of inserting data. 0 is RecordMemController, which sums the
-   * getTotalDataNumber of each record (tuple). 1 is JVMMemController, which uses the JVM heap memory as the
+   * size of each record (tuple). 1 is JVMMemController, which uses the JVM heap memory as the
    * memory usage indicator.
    */
   private int memControllerType = 1;
   /**
-   * When a bufferwrite's metadata getTotalDataNumber (in byte) exceed this, the bufferwrite is forced closed.
+   * When a bufferwrite's metadata size (in byte) exceed this, the bufferwrite is forced closed.
    */
   private long bufferwriteMetaSizeThreshold = 200 * 1024 * 1024L;
   /**
-   * When a bufferwrite's file getTotalDataNumber (in byte) exceed this, the bufferwrite is forced closed.
+   * When a bufferwrite's file size (in byte) exceed this, the bufferwrite is forced closed.
    */
   private long bufferwriteFileSizeThreshold = 2 * 1024 * 1024 * 1024L;
   /**
-   * When a overflow's metadata getTotalDataNumber (in byte) exceed this, the overflow is forced closed.
+   * When a overflow's metadata size (in byte) exceed this, the overflow is forced closed.
    */
   private long overflowMetaSizeThreshold = 20 * 1024 * 1024L;
   /**
-   * When a overflow's file getTotalDataNumber (in byte) exceed this, the overflow is forced closed.
+   * When a overflow's file size (in byte) exceed this, the overflow is forced closed.
    */
   private long overflowFileSizeThreshold = 200 * 1024 * 1024L;
   /**
@@ -253,11 +253,11 @@ public class IoTDBConfig {
    */
   private int externalSortThreshold = 50;
   /**
-   * Cache getTotalDataNumber of {@code checkAndGetDataTypeCache} in {@link MManager}.
+   * Cache size of {@code checkAndGetDataTypeCache} in {@link MManager}.
    */
   private int mManagerCacheSize = 400000;
   /**
-   * The maximum getTotalDataNumber of a single log in byte. If a log exceeds this getTotalDataNumber, it cannot be written to
+   * The maximum size of a single log in byte. If a log exceeds this size, it cannot be written to
    * the WAL file and an exception is thrown.
    */
   private int maxLogEntrySize = 4 * 1024 * 1024;
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/engine/bufferwrite/BufferWriteProcessor.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/bufferwrite/BufferWriteProcessor.java
index 0f5fcd8..56a9d17 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/engine/bufferwrite/BufferWriteProcessor.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/bufferwrite/BufferWriteProcessor.java
@@ -175,7 +175,7 @@ public class BufferWriteProcessor extends Processor {
    * @param timestamp timestamp of the data point
    * @param dataType the data type of the value
    * @param value data point value
-   * @return true -the getTotalDataNumber of tsfile or metadata reaches to the threshold. false -otherwise
+   * @return true -the size of tsfile or metadata reaches to the threshold. false -otherwise
    * @throws BufferWriteProcessorException if a flushing operation occurs and failed.
    */
   public boolean write(String deviceId, String measurementId, long timestamp, TSDataType dataType,
@@ -442,7 +442,7 @@ public class BufferWriteProcessor extends Processor {
       } else {
         if (LOGGER.isInfoEnabled()) {
           LOGGER.info(
-              "Begin to submit flush task for bufferwrite processor {}, current Flush Queue is {}, core pool getTotalDataNumber is {}.",
+              "Begin to submit flush task for bufferwrite processor {}, current Flush Queue is {}, core pool size is {}.",
               getProcessorName(), FlushPoolManager.getInstance().getWaitingTasksNumber(),
               FlushPoolManager.getInstance().getCorePoolSize());
         }
@@ -530,9 +530,9 @@ public class BufferWriteProcessor extends Processor {
   }
 
   /**
-   * get metadata getTotalDataNumber.
+   * get metadata size.
    *
-   * @return The sum of all timeseries's metadata getTotalDataNumber within this file.
+   * @return The sum of all timeseries's metadata size within this file.
    */
   public long getMetaSize() {
     // TODO : [MemControl] implement this
@@ -540,9 +540,9 @@ public class BufferWriteProcessor extends Processor {
   }
 
   /**
-   * get file getTotalDataNumber.
+   * get file size.
    *
-   * @return The file getTotalDataNumber of the TsFile corresponding to this processor.
+   * @return The file size of the TsFile corresponding to this processor.
    */
   public long getFileSize() {
     // TODO : save this variable to avoid object creation?
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/engine/bufferwrite/RestorableTsFileIOWriter.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/bufferwrite/RestorableTsFileIOWriter.java
index ec5b109..d231701 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/engine/bufferwrite/RestorableTsFileIOWriter.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/bufferwrite/RestorableTsFileIOWriter.java
@@ -108,7 +108,7 @@ public class RestorableTsFileIOWriter extends TsFileIOWriter {
       recoverMetadata(existedMetadatas);
       LOGGER.info(
           "Recover the bufferwrite processor {}, the tsfile seriesPath is {}, "
-              + "the position of last flushed ChunkGroup is {}, the getTotalDataNumber of rowGroupMetadata is {}",
+              + "the position of last flushed ChunkGroup is {}, the size of rowGroupMetadata is {}",
           processorName, insertFilePath, position, existedMetadatas.size());
       isNewResource = false;
     } else {
@@ -165,7 +165,7 @@ public class RestorableTsFileIOWriter extends TsFileIOWriter {
       }
       ByteArrayOutputStream baos = new ByteArrayOutputStream();
       tsDeviceMetadata.serializeTo(baos);
-      // insert metadata getTotalDataNumber using int
+      // insert metadata size using int
       int metadataSize = baos.size();
       out.write(BytesUtils.intToBytes(metadataSize));
       // insert metadata
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/engine/cache/RowGroupBlockMetaDataCache.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/cache/RowGroupBlockMetaDataCache.java
index 6be0958..044fb5d 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/engine/cache/RowGroupBlockMetaDataCache.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/cache/RowGroupBlockMetaDataCache.java
@@ -104,7 +104,7 @@ public class RowGroupBlockMetaDataCache {
   }
 
   /**
-   * the default LRU cache getTotalDataNumber is 100. The singleton pattern.
+   * the default LRU cache size is 100. The singleton pattern.
    */
   private static class RowGroupBlockMetaDataCacheSingleton {
 
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/engine/filenode/FileNodeManager.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/filenode/FileNodeManager.java
index 8247157..8ab025d 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/engine/filenode/FileNodeManager.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/filenode/FileNodeManager.java
@@ -110,7 +110,7 @@
 //    }
 //
 //    String normalizedBaseDir = baseDir;
-//    if (normalizedBaseDir.charAt(normalizedBaseDir.getTotalDataNumber() - 1) != File.separatorChar) {
+//    if (normalizedBaseDir.charAt(normalizedBaseDir.size() - 1) != File.separatorChar) {
 //      normalizedBaseDir += Character.toString(File.separatorChar);
 //    }
 //    this.baseDir = normalizedBaseDir;
@@ -126,12 +126,12 @@
 //    }
 //
 //    closedProcessorCleaner.scheduleWithFixedDelay(()->{
-//      int getTotalDataNumber = 0;
+//      int size = 0;
 //      for (FileNodeProcessor fileNodeProcessor : processorMap.values()) {
-//        getTotalDataNumber += fileNodeProcessor.getClosingBufferWriteProcessor().getTotalDataNumber();
+//        size += fileNodeProcessor.getClosingBufferWriteProcessor().size();
 //      }
-//      if (getTotalDataNumber > 5) {
-//        LOGGER.info("Current closing processor number is {}", getTotalDataNumber);
+//      if (size > 5) {
+//        LOGGER.info("Current closing processor number is {}", size);
 //      }
 ////      for (FileNodeProcessor fileNodeProcessor : processorMap.values()) {
 ////        fileNodeProcessor.checkAllClosingProcessors();
@@ -148,7 +148,7 @@
 //    statParamsHashMap.get(MonitorConstants.FileNodeManagerStatConstants.TOTAL_REQ_FAIL.name())
 //        .incrementAndGet();
 //    statParamsHashMap.get(MonitorConstants.FileNodeManagerStatConstants.TOTAL_POINTS_FAIL.name())
-//        .addAndGet(tsRecord.dataPointList.getTotalDataNumber());
+//        .addAndGet(tsRecord.dataPointList.size());
 //  }
 //
 //  /**
@@ -337,7 +337,7 @@
 //    if (!isMonitor) {
 //      fileNodeProcessor.getStatParamsHashMap()
 //          .get(MonitorConstants.FileNodeProcessorStatConstants.TOTAL_POINTS_SUCCESS.name())
-//          .addAndGet(tsRecord.dataPointList.getTotalDataNumber());
+//          .addAndGet(tsRecord.dataPointList.size());
 //      fileNodeProcessor.getStatParamsHashMap()
 //          .get(MonitorConstants.FileNodeProcessorStatConstants.TOTAL_REQ_SUCCESS.name())
 //          .incrementAndGet();
@@ -345,7 +345,7 @@
 //          .incrementAndGet();
 //      statParamsHashMap
 //          .get(MonitorConstants.FileNodeManagerStatConstants.TOTAL_POINTS_SUCCESS.name())
-//          .addAndGet(tsRecord.dataPointList.getTotalDataNumber());
+//          .addAndGet(tsRecord.dataPointList.size());
 //    }
 //    return insertType;
 //  }
@@ -354,8 +354,8 @@
 //      throws FileNodeManagerException {
 //    try {
 //      if (IoTDBDescriptor.getInstance().getConfig().isEnableWal()) {
-//        String[] measurementList = new String[tsRecord.dataPointList.getTotalDataNumber()];
-//        String[] insertValues = new String[tsRecord.dataPointList.getTotalDataNumber()];
+//        String[] measurementList = new String[tsRecord.dataPointList.size()];
+//        String[] insertValues = new String[tsRecord.dataPointList.size()];
 //        int i=0;
 //        for (DataPoint dp : tsRecord.dataPointList) {
 //          measurementList[i] = dp.getMeasurementId();
@@ -383,7 +383,7 @@
 //  private void updateStat(boolean isMonitor, TSRecord tsRecord) {
 //    if (!isMonitor) {
 //      statParamsHashMap.get(MonitorConstants.FileNodeManagerStatConstants.TOTAL_POINTS.name())
-//          .addAndGet(tsRecord.dataPointList.getTotalDataNumber());
+//          .addAndGet(tsRecord.dataPointList.size());
 //    }
 //  }
 //
@@ -539,7 +539,7 @@
 //      if (LOGGER.isInfoEnabled()) {
 //        LOGGER.info(
 //            "The filenode processor {} will setCloseMark the bufferwrite processor, "
-//                + "because the getTotalDataNumber[{}] of tsfile {} reaches the threshold {}",
+//                + "because the size[{}] of tsfile {} reaches the threshold {}",
 //            filenodeName, MemUtils.bytesCntToStr(bufferWriteProcessor.getFileSize()),
 //            bufferWriteProcessor.getInsertFilePath(), MemUtils.bytesCntToStr(
 //                IoTDBDescriptor.getInstance().getConfig().getBufferwriteFileSizeThreshold()));
@@ -1018,9 +1018,9 @@
 //
 //  private String standardizeDir(String originalPath) {
 //    String res = originalPath;
-//    if ((originalPath.getTotalDataNumber() > 0
-//        && originalPath.charAt(originalPath.getTotalDataNumber() - 1) != File.separatorChar)
-//        || originalPath.getTotalDataNumber() == 0) {
+//    if ((originalPath.size() > 0
+//        && originalPath.charAt(originalPath.size() - 1) != File.separatorChar)
+//        || originalPath.size() == 0) {
 //      res = originalPath + File.separatorChar;
 //    }
 //    return res;
@@ -1182,7 +1182,7 @@
 //    // you may add some delicate process like below
 //    // or you could provide multiple methods for different urgency
 //    switch (level) {
-//      // only select the most urgent (most active or biggest in getTotalDataNumber)
+//      // only select the most urgent (most active or biggest in size)
 //      // processors to flush
 //      // only select top 10% active memory user to flush
 //      case WARNING:
@@ -1237,10 +1237,10 @@
 //    // sort the tempProcessors as descending order
 //    tempProcessors.sort((o1, o2) -> (int) (o2.memoryUsage() - o1.memoryUsage()));
 //    int flushNum =
-//        (int) (tempProcessors.getTotalDataNumber() * percentage) > 1
-//            ? (int) (tempProcessors.getTotalDataNumber() * percentage)
+//        (int) (tempProcessors.size() * percentage) > 1
+//            ? (int) (tempProcessors.size() * percentage)
 //            : 1;
-//    for (int i = 0; i < flushNum && i < tempProcessors.getTotalDataNumber(); i++) {
+//    for (int i = 0; i < flushNum && i < tempProcessors.size(); i++) {
 //      FileNodeProcessor processor = tempProcessors.get(i);
 //      // 64M
 //      if (processor.memoryUsage() <= TSFileConfig.groupSizeInByte / 2) {
@@ -1276,11 +1276,11 @@
 //
 //    boolean notFinished = true;
 //    while (notFinished) {
-//      int getTotalDataNumber = 0;
+//      int size = 0;
 //      for (FileNodeProcessor fileNodeProcessor : processorMap.values()) {
-//        getTotalDataNumber += fileNodeProcessor.getClosingBufferWriteProcessor().getTotalDataNumber();
+//        size += fileNodeProcessor.getClosingBufferWriteProcessor().size();
 //      }
-//      if (getTotalDataNumber == 0) {
+//      if (size == 0) {
 //        notFinished = false;
 //      } else {
 //        try {
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/engine/filenode/FileNodeProcessor.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/filenode/FileNodeProcessor.java
index 0a3f604..1c5f225 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/engine/filenode/FileNodeProcessor.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/filenode/FileNodeProcessor.java
@@ -286,8 +286,8 @@
 //
 //    this.parameters = new HashMap<>();
 //    String dirPath = fileNodeDirPath;
-//    if (dirPath.getTotalDataNumber() > 0
-//        && dirPath.charAt(dirPath.getTotalDataNumber() - 1) != File.separatorChar) {
+//    if (dirPath.size() > 0
+//        && dirPath.charAt(dirPath.size() - 1) != File.separatorChar) {
 //      dirPath = dirPath + File.separatorChar;
 //    }
 //
@@ -467,7 +467,7 @@
 //    parameters.put(FileNodeConstants.OVERFLOW_FLUSH_ACTION, overflowFlushAction);
 //    parameters.put(FileNodeConstants.FILENODE_PROCESSOR_FLUSH_ACTION, fileNodeFlushAction);
 //
-//    for (int i = 0; i < newFileNodes.getTotalDataNumber(); i++) {
+//    for (int i = 0; i < newFileNodes.size(); i++) {
 //      TsFileResource tsFile = newFileNodes.get(i);
 ////      try {
 ////        String filePath = tsFile.getFilePath();
@@ -722,7 +722,7 @@
 //  private int searchIndexNodeByTimestamp(String deviceId, long timestamp,
 //      List<TsFileResource> fileList) {
 //    int index = 1;
-//    while (index < fileList.getTotalDataNumber()) {
+//    while (index < fileList.size()) {
 //      if (timestamp < fileList.get(index).getStartTime(deviceId)) {
 //        break;
 //      } else {
@@ -813,15 +813,15 @@
 //    // bufferwrite data
 //    UnsealedTsFile unsealedTsFile = null;
 //
-//    if (!newFileNodes.isEmpty() && !newFileNodes.get(newFileNodes.getTotalDataNumber() - 1).isClosed()
-//        && !newFileNodes.get(newFileNodes.getTotalDataNumber() - 1).getStartTimeMap().isEmpty()) {
+//    if (!newFileNodes.isEmpty() && !newFileNodes.get(newFileNodes.size() - 1).isClosed()
+//        && !newFileNodes.get(newFileNodes.size() - 1).getStartTimeMap().isEmpty()) {
 //      unsealedTsFile = new UnsealedTsFile();
-//      unsealedTsFile.setFilePath(newFileNodes.get(newFileNodes.getTotalDataNumber() - 1).getFile().getAbsolutePath());
+//      unsealedTsFile.setFilePath(newFileNodes.get(newFileNodes.size() - 1).getFile().getAbsolutePath());
 //      if (bufferWriteProcessor == null) {
 //        throw new FileNodeProcessorException(String.format(
 //            "The last of tsfile %s in filenode processor %s is not closed, "
 //                + "but the bufferwrite processor is null.",
-//            newFileNodes.get(newFileNodes.getTotalDataNumber() - 1).getFile().getAbsolutePath(), getProcessorName()));
+//            newFileNodes.get(newFileNodes.size() - 1).getFile().getAbsolutePath(), getProcessorName()));
 //      }
 //      bufferwritedata = bufferWriteProcessor
 //          .queryBufferWriteData(deviceId, measurementId, dataType, mSchema.getProps());
@@ -975,7 +975,7 @@
 //          .getConfig().getOverflowFileSizeThreshold()) {
 //        if (LOGGER.isInfoEnabled()) {
 //          LOGGER.info(
-//              "Skip this merge taks submission, because the getTotalDataNumber{} of overflow processor {} "
+//              "Skip this merge taks submission, because the size{} of overflow processor {} "
 //                  + "does not reaches the threshold {}.",
 //              MemUtils.bytesCntToStr(overflowProcessor.getFileSize()), getProcessorName(),
 //              MemUtils.bytesCntToStr(
@@ -1118,7 +1118,7 @@
 //
 //    // query tsfile data and overflow data, and merge them
 //    int numOfMergeFiles = 0;
-//    int allNeedMergeFiles = backupIntervalFiles.getTotalDataNumber();
+//    int allNeedMergeFiles = backupIntervalFiles.size();
 //    for (TsFileResource backupIntervalFile : backupIntervalFiles) {
 //      numOfMergeFiles++;
 //      if (backupIntervalFile.getOverflowChangeType() == OverflowChangeType.CHANGED) {
@@ -1234,7 +1234,7 @@
 //      for (String deviceId : tsFileResource.getEndTimeMap().keySet()) {
 //        List<TsFileResource> temp = invertedIndexOfFiles.get(deviceId);
 //        int index = temp.indexOf(tsFileResource);
-//        int getTotalDataNumber = temp.getTotalDataNumber();
+//        int size = temp.size();
 //        // start time
 //        if (index == 0) {
 //          startTimeMap.put(deviceId, 0L);
@@ -1242,7 +1242,7 @@
 //          startTimeMap.put(deviceId, tsFileResource.getStartTime(deviceId));
 //        }
 //        // end time
-//        if (index < getTotalDataNumber - 1) {
+//        if (index < size - 1) {
 //          endTimeMap.put(deviceId, temp.get(index + 1).getStartTime(deviceId) - 1);
 //        } else {
 //          endTimeMap.put(deviceId, tsFileResource.getEndTime(deviceId));
@@ -1276,7 +1276,7 @@
 //      // reconstruct the file index
 //      addAllFileIntoIndex(backupIntervalFiles);
 //      // check the merge changed file
-//      for (int i = beginIndex; i < backupIntervalFiles.getTotalDataNumber(); i++) {
+//      for (int i = beginIndex; i < backupIntervalFiles.size(); i++) {
 //        TsFileResource newFile = newFileNodes.get(i - beginIndex);
 //        TsFileResource temp = backupIntervalFiles.get(i);
 //        if (newFile.getOverflowChangeType() == OverflowChangeType.MERGING_CHANGE) {
@@ -1287,7 +1287,7 @@
 //        }
 //      }
 //      // add new file when merge
-//      for (int i = backupIntervalFiles.getTotalDataNumber() - beginIndex; i < newFileNodes.getTotalDataNumber(); i++) {
+//      for (int i = backupIntervalFiles.size() - beginIndex; i < newFileNodes.size(); i++) {
 //        TsFileResource fileNode = newFileNodes.get(i);
 //        if (fileNode.isClosed()) {
 //          result.add(fileNode.backUp());
@@ -1386,9 +1386,9 @@
 //        collectBufferWriteFiles(bufferFiles);
 //
 //        // add the restore file, if the last file is not closed
-//        if (!newFileNodes.isEmpty() && !newFileNodes.get(newFileNodes.getTotalDataNumber() - 1).isClosed()) {
+//        if (!newFileNodes.isEmpty() && !newFileNodes.get(newFileNodes.size() - 1).isClosed()) {
 //          String bufferFileRestorePath =
-//              newFileNodes.get(newFileNodes.getTotalDataNumber() - 1).getFile().getAbsolutePath() + RESTORE_FILE_SUFFIX;
+//              newFileNodes.get(newFileNodes.size() - 1).getFile().getAbsolutePath() + RESTORE_FILE_SUFFIX;
 //          bufferFiles.add(bufferFileRestorePath);
 //        }
 //
@@ -1428,8 +1428,8 @@
 //  private void collectBufferWriteDirs(List<String> bufferwriteDirPathList,
 //      List<File> bufferwriteDirList) {
 //    for (String bufferwriteDirPath : bufferwriteDirPathList) {
-//      if (bufferwriteDirPath.getTotalDataNumber() > 0
-//          && bufferwriteDirPath.charAt(bufferwriteDirPath.getTotalDataNumber() - 1)
+//      if (bufferwriteDirPath.size() > 0
+//          && bufferwriteDirPath.charAt(bufferwriteDirPath.size() - 1)
 //          != File.separatorChar) {
 //        bufferwriteDirPath = bufferwriteDirPath + File.separatorChar;
 //      }
@@ -1677,7 +1677,7 @@
 //  private String constructOutputFilePath(String baseDir, String processorName, String fileName) {
 //
 //    String localBaseDir = baseDir;
-//    if (localBaseDir.charAt(localBaseDir.getTotalDataNumber() - 1) != File.separatorChar) {
+//    if (localBaseDir.charAt(localBaseDir.size() - 1) != File.separatorChar) {
 //      localBaseDir = localBaseDir + File.separatorChar + processorName;
 //    }
 //    File dataDir = new File(localBaseDir);
@@ -1877,7 +1877,7 @@
 //
 //    synchronized (fileNodeRestoreLock) {
 //      File restoreFile = new File(fileNodeRestoreFilePath);
-//      if (!restoreFile.exists() || restoreFile.getTotalDataNumber() == 0) {
+//      if (!restoreFile.exists() || restoreFile.size() == 0) {
 //        try {
 //          return new FileNodeProcessorStore(false, new HashMap<>(),
 //              new TsFileResource(null, false),
@@ -2098,7 +2098,7 @@
 //   */
 //  public void waitforAllClosed() throws FileNodeProcessorException {
 //    close();
-//    while (getClosingBufferWriteProcessor().getTotalDataNumber() != 0) {
+//    while (getClosingBufferWriteProcessor().size() != 0) {
 //      checkAllClosingProcessors();
 //      try {
 //        Thread.sleep(10);
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/engine/filenodeV2/FileNodeProcessorV2.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/filenodeV2/FileNodeProcessorV2.java
index 21fae03..5b907bd 100755
--- a/iotdb/src/main/java/org/apache/iotdb/db/engine/filenodeV2/FileNodeProcessorV2.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/filenodeV2/FileNodeProcessorV2.java
@@ -233,7 +233,13 @@ public class FileNodeProcessorV2 {
    * @return -1: failed, 1: Overflow, 2:Bufferwrite
    */
   public boolean insert(InsertPlan insertPlan) {
+    long lockStartTime = System.currentTimeMillis();
     lock.writeLock().lock();
+    long lockElapsed = System.currentTimeMillis() - lockStartTime;
+    if (lockElapsed > 1000) {
+      LOGGER.info("FNP insert waiting for lock costs {} ms", lockElapsed);
+    }
+    long start = System.currentTimeMillis();
     try {
       if (toBeClosed) {
         throw new FileNodeProcessorException(
@@ -253,6 +259,10 @@ public class FileNodeProcessorV2 {
       LOGGER.error("insert tsRecord to unsealed data file failed, because {}", e.getMessage(), e);
       return false;
     } finally {
+      long elapse = System.currentTimeMillis() - start;
+      if (elapse > 5000) {
+        LOGGER.info("long-tail insertion, cost: {}", elapse);
+      }
       lock.writeLock().unlock();
     }
   }
@@ -284,8 +294,13 @@ public class FileNodeProcessorV2 {
       latestTimeForEachDevice.put(insertPlan.getDeviceId(), insertPlan.getTime());
     }
 
-    // check memtable getTotalDataNumber and may asyncFlush the workMemtable
+    // check memtable size and may asyncFlush the workMemtable
     if (unsealedTsFileProcessor.shouldFlush()) {
+
+      LOGGER.info("The memtable size {} reaches the threshold, async flush it to tsfile: {}",
+          unsealedTsFileProcessor.getWorkMemTableMemory(),
+          unsealedTsFileProcessor.getTsFileResource().getFile().getAbsolutePath());
+
       if (unsealedTsFileProcessor.shouldClose()) {
         asyncCloseTsFileProcessor(unsealedTsFileProcessor, sequence);
       } else {
@@ -326,11 +341,7 @@ public class FileNodeProcessorV2 {
   private void asyncCloseTsFileProcessor(UnsealedTsFileProcessorV2 unsealedTsFileProcessor,
       boolean sequence) {
 
-    LOGGER.info("The memtable getTotalDataNumber {} reaches the threshold, async flush it to tsfile: {}",
-        unsealedTsFileProcessor.getWorkMemTableMemory(),
-        unsealedTsFileProcessor.getTsFileResource().getFile().getAbsolutePath());
-
-    // check file getTotalDataNumber and may setCloseMark the BufferWrite
+    // check file size and may setCloseMark the BufferWrite
     if (sequence) {
       closingSequenceTsFileProcessor.add(unsealedTsFileProcessor);
       workSequenceTsFileProcessor = null;
@@ -342,7 +353,7 @@ public class FileNodeProcessorV2 {
     // async close tsfile
     unsealedTsFileProcessor.asyncClose();
 
-    LOGGER.info("The file getTotalDataNumber {} reaches the threshold, async close tsfile: {}.",
+    LOGGER.info("The file size {} reaches the threshold, async close tsfile: {}.",
         unsealedTsFileProcessor.getTsFileResource().getFileSize(),
         unsealedTsFileProcessor.getTsFileResource().getFile().getAbsolutePath());
   }
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/engine/filenodeV2/FlushManager.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/filenodeV2/FlushManager.java
index b683085..b971b75 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/engine/filenodeV2/FlushManager.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/filenodeV2/FlushManager.java
@@ -58,7 +58,7 @@ public class FlushManager {
   public Future registerUnsealedTsFileProcessor(UnsealedTsFileProcessorV2 unsealedTsFileProcessor) {
     synchronized (unsealedTsFileProcessor) {
       if (!unsealedTsFileProcessor.isManagedByFlushManager() && unsealedTsFileProcessor.getFlushingMemTableSize() > 0) {
-        LOGGER.info("begin to submit a flush thread, flushing memtable getTotalDataNumber: {}", unsealedTsFileProcessor.getFlushingMemTableSize());
+        LOGGER.info("begin to submit a flush thread, flushing memtable size: {}", unsealedTsFileProcessor.getFlushingMemTableSize());
         unsealedTsFileProcessorQueue.add(unsealedTsFileProcessor);
         unsealedTsFileProcessor.setManagedByFlushManager(true);
         return flushPool.submit(new FlushThread());
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/engine/filenodeV2/UnsealedTsFileProcessorV2.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/filenodeV2/UnsealedTsFileProcessorV2.java
index 9708dc3..e13be6c 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/engine/filenodeV2/UnsealedTsFileProcessorV2.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/filenodeV2/UnsealedTsFileProcessorV2.java
@@ -207,7 +207,9 @@ public class UnsealedTsFileProcessorV2 {
     try {
       IMemTable tmpMemTable = workMemTable == null ? new EmptyMemTable() : workMemTable;
       if (!tmpMemTable.isManagedByMemPool()) {
-        LOGGER.debug("add an empty memtable into flushing memtable list when sync close");
+        LOGGER.info("add an empty memtable into flushing memtable list when async close");
+      } else {
+        LOGGER.info("async flush a memtable when async close");
       }
       flushingMemTables.add(tmpMemTable);
       shouldClose = true;
@@ -283,7 +285,7 @@ public class UnsealedTsFileProcessorV2 {
       writer.makeMetadataVisible();
       flushingMemTables.remove(memTable);
       LOGGER.info(
-          "flush finished, remove a memtable from flushing list, flushing memtable list getTotalDataNumber: {}",
+          "flush finished, remove a memtable from flushing list, flushing memtable list size: {}",
           flushingMemTables.size());
     } finally {
       flushQueryLock.writeLock().unlock();
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/engine/memcontrol/BasicMemController.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/memcontrol/BasicMemController.java
index 71e8ce2..220d7bb 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/engine/memcontrol/BasicMemController.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/memcontrol/BasicMemController.java
@@ -153,7 +153,7 @@ public abstract class BasicMemController implements IService {
   }
 
   /**
-   * Any object (like OverflowProcessor or BufferWriteProcessor) that wants to hold some fixed getTotalDataNumber
+   * Any object (like OverflowProcessor or BufferWriteProcessor) that wants to hold some fixed size
    * of memory should call this method to check the returned memory usage level to decide any
    * further actions.
    * @param user an object that wants some memory as a buffer or anything.
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/engine/memcontrol/FlushPartialPolicy.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/memcontrol/FlushPartialPolicy.java
index bfab3b4..08567fe 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/engine/memcontrol/FlushPartialPolicy.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/memcontrol/FlushPartialPolicy.java
@@ -38,7 +38,7 @@ public class FlushPartialPolicy implements Policy {
   @Override
   public void execute() {
     if (LOGGER.isDebugEnabled()) {
-      LOGGER.debug("Memory reaches {}, current memory getTotalDataNumber is {}, JVM memory is {}, flushing.",
+      LOGGER.debug("Memory reaches {}, current memory size is {}, JVM memory is {}, flushing.",
               BasicMemController.getInstance().getCurrLevel(),
               MemUtils.bytesCntToStr(BasicMemController.getInstance().getTotalUsage()),
               MemUtils.bytesCntToStr(Runtime.getRuntime().totalMemory()
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/engine/memcontrol/ForceFLushAllPolicy.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/memcontrol/ForceFLushAllPolicy.java
index 930e260..e68e712 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/engine/memcontrol/ForceFLushAllPolicy.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/memcontrol/ForceFLushAllPolicy.java
@@ -33,7 +33,7 @@ public class ForceFLushAllPolicy implements Policy {
   @Override
   public void execute() {
     if (logger.isInfoEnabled()) {
-      logger.info("Memory reaches {}, current memory getTotalDataNumber is {}, JVM memory is {}, flushing.",
+      logger.info("Memory reaches {}, current memory size is {}, JVM memory is {}, flushing.",
               BasicMemController.getInstance().getCurrLevel(),
               MemUtils.bytesCntToStr(BasicMemController.getInstance().getTotalUsage()),
               MemUtils.bytesCntToStr(Runtime.getRuntime().totalMemory()
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/engine/memtable/AbstractMemTable.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/memtable/AbstractMemTable.java
index cfc2a58..d3a1a25 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/engine/memtable/AbstractMemTable.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/memtable/AbstractMemTable.java
@@ -108,7 +108,7 @@ public abstract class AbstractMemTable implements IMemTable {
       Object value) {
     IWritableMemChunk memSeries = createIfNotExistAndGet(deviceId, measurement, dataType);
     memSeries.write(insertTime, value);
-    // update memory getTotalDataNumber of current memtable
+    // update memory size of current memtable
   }
 
   @Override
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/engine/memtable/MemTablePool.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/memtable/MemTablePool.java
index a9493d1..4902ca6 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/engine/memtable/MemTablePool.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/memtable/MemTablePool.java
@@ -48,12 +48,12 @@ public class MemTablePool {
     synchronized (emptyMemTables) {
       if (emptyMemTables.isEmpty() && size < capacity) {
         size++;
-        LOGGER.info("generated a new memtable for {}, system memtable getTotalDataNumber: {}, stack getTotalDataNumber: {}",
+        LOGGER.info("generated a new memtable for {}, system memtable size: {}, stack size: {}",
             applier, size, emptyMemTables.size());
         return new PrimitiveMemTable();
       } else if (!emptyMemTables.isEmpty()) {
         LOGGER
-            .info("system memtable getTotalDataNumber: {}, stack getTotalDataNumber: {}, then get a memtable from stack for {}",
+            .info("system memtable size: {}, stack size: {}, then get a memtable from stack for {}",
                 size, emptyMemTables.size(), applier);
         return emptyMemTables.pop();
       }
@@ -63,7 +63,7 @@ public class MemTablePool {
       while (true) {
         if (!emptyMemTables.isEmpty()) {
           LOGGER.info(
-              "system memtable getTotalDataNumber: {}, stack getTotalDataNumber: {}, then get a memtable from stack for {}",
+              "system memtable size: {}, stack size: {}, then get a memtable from stack for {}",
               size, emptyMemTables.size(), applier);
           return emptyMemTables.pop();
         }
@@ -82,7 +82,7 @@ public class MemTablePool {
       memTable.clear();
       emptyMemTables.push(memTable);
       emptyMemTables.notify();
-      LOGGER.info("a memtable returned, stack getTotalDataNumber {}", emptyMemTables.size());
+      LOGGER.info("a memtable returned, stack size {}", emptyMemTables.size());
     }
   }
 
@@ -91,7 +91,7 @@ public class MemTablePool {
       memTable.clear();
       emptyMemTables.push(memTable);
       emptyMemTables.notify();
-      LOGGER.info("{} return a memtable, stack getTotalDataNumber {}", storageGroup, emptyMemTables.size());
+      LOGGER.info("{} return a memtable, stack size {}", storageGroup, emptyMemTables.size());
     }
   }
 
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/monitor/MonitorConstants.java b/iotdb/src/main/java/org/apache/iotdb/db/monitor/MonitorConstants.java
index a337db4..129aa91 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/monitor/MonitorConstants.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/monitor/MonitorConstants.java
@@ -36,7 +36,7 @@ public class MonitorConstants {
   private static final String FILENODE_MANAGER_CONST = "FILENODE_MANAGER_CONST";
   static final String FILE_SIZE_CONST = "FILE_SIZE_CONST";
   public static final String MONITOR_PATH_SEPARATOR = ".";
-  // statistic for file getTotalDataNumber statistic module
+  // statistic for file size statistic module
   private static final String FILE_SIZE = "file_size";
   public static final String FILE_SIZE_STORAGE_GROUP_NAME = STAT_STORAGE_GROUP_PREFIX
       + MONITOR_PATH_SEPARATOR + FILE_SIZE;
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/monitor/StatMonitor.java b/iotdb/src/main/java/org/apache/iotdb/db/monitor/StatMonitor.java
index 5f3f630..bb5f04d 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/monitor/StatMonitor.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/monitor/StatMonitor.java
@@ -154,7 +154,7 @@ public class StatMonitor implements IService {
   /**
    * register monitor statistics time series metadata into MManager.
    *
-   * @param hashMap series path and data type pair, for example: [root.stat.file.getTotalDataNumber.DATA, INT64]
+   * @param hashMap series path and data type pair, for example: [root.stat.file.size.DATA, INT64]
    */
   public synchronized void registerStatStorageGroup(Map<String, String> hashMap) {
     MManager mManager = MManager.getInstance();
@@ -197,7 +197,7 @@ public class StatMonitor implements IService {
   /**
    * register class which implemented IStatistic interface into statisticMap
    *
-   * @param path the stat series prefix path, like root.stat.file.getTotalDataNumber
+   * @param path the stat series prefix path, like root.stat.file.size
    * @param iStatistic instance of class which implemented IStatistic interface
    */
   public void registerStatistics(String path, IStatistic iStatistic) {
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/monitor/collector/FileSize.java b/iotdb/src/main/java/org/apache/iotdb/db/monitor/collector/FileSize.java
index eb5f5e7..e9ecba2 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/monitor/collector/FileSize.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/monitor/collector/FileSize.java
@@ -47,7 +47,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * This class is to collect some file getTotalDataNumber statistics.
+ * This class is to collect some file size statistics.
  */
 public class FileSize implements IStatistic {
 
@@ -128,16 +128,16 @@ public class FileSize implements IStatistic {
   }
 
   /**
-   * Return a map[FileSizeConstants, Long]. The key is the dir type and the value is the dir getTotalDataNumber in
+   * Return a map[FileSizeConstants, Long]. The key is the dir type and the value is the dir size in
    * byte.
    *
-   * @return a map[FileSizeConstants, Long] with the dir type and the dir getTotalDataNumber in byte
+   * @return a map[FileSizeConstants, Long] with the dir type and the dir size in byte
    */
   public Map<FileSizeConstants, Long> getFileSizesInByte() {
     EnumMap<FileSizeConstants, Long> fileSizes = new EnumMap<>(FileSizeConstants.class);
     for (FileSizeConstants kinds : MonitorConstants.FileSizeConstants.values()) {
       if (kinds.equals(MonitorConstants.FileSizeConstants.SETTLED)) {
-        //sum bufferWriteDirs getTotalDataNumber
+        //sum bufferWriteDirs size
         long settledSize = INIT_VALUE_IF_FILE_NOT_EXIST;
         for (String bufferWriteDir : config.getBufferWriteDirs()) {
           File settledFile = new File(bufferWriteDir);
@@ -145,7 +145,7 @@ public class FileSize implements IStatistic {
             try {
               settledSize += FileUtils.sizeOfDirectory(settledFile);
             } catch (Exception e) {
-              LOGGER.error("Meet error while trying to get {} getTotalDataNumber with dir {} .", kinds,
+              LOGGER.error("Meet error while trying to get {} size with dir {} .", kinds,
                   bufferWriteDir, e);
               fileSizes.put(kinds, ABNORMAL_VALUE);
             }
@@ -159,7 +159,7 @@ public class FileSize implements IStatistic {
             fileSizes.put(kinds, FileUtils.sizeOfDirectory(file));
           } catch (Exception e) {
             LOGGER
-                .error("Meet error while trying to get {} getTotalDataNumber with dir {} .", kinds,
+                .error("Meet error while trying to get {} size with dir {} .", kinds,
                     kinds.getPath(),
                     e);
             fileSizes.put(kinds, ABNORMAL_VALUE);
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/qp/strategy/PhysicalGenerator.java b/iotdb/src/main/java/org/apache/iotdb/db/qp/strategy/PhysicalGenerator.java
index a490531..ffa0cdf 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/qp/strategy/PhysicalGenerator.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/qp/strategy/PhysicalGenerator.java
@@ -116,7 +116,7 @@ public class PhysicalGenerator {
       // UpdatePlan updatePlan = new UpdatePlan();
       // updatePlan.setValue(update.getValue());
       // paths = update.getSelectedPaths();
-      // if (paths.getTotalDataNumber() > 1) {
+      // if (paths.size() > 1) {
       // throw new LogicalOperatorException("update command, must have and only have one seriesPath:" + paths);
       // }
       // updatePlan.setPath(paths.get(0));
@@ -317,9 +317,9 @@ public class PhysicalGenerator {
   // break;
   // }
   // }
-  // if (valueList.getTotalDataNumber() == 1) {
+  // if (valueList.size() == 1) {
   // valueFilter = valueList.get(0);
-  // } else if (valueList.getTotalDataNumber() > 1) {
+  // } else if (valueList.size() > 1) {
   // valueFilter = new FilterOperator(KW_AND, false);
   // valueFilter.setChildren(valueList);
   // }
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/query/dataset/groupby/GroupByWithValueFilterDataSet.java b/iotdb/src/main/java/org/apache/iotdb/db/query/dataset/groupby/GroupByWithValueFilterDataSet.java
index 29e0e15..6db4662 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/query/dataset/groupby/GroupByWithValueFilterDataSet.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/query/dataset/groupby/GroupByWithValueFilterDataSet.java
@@ -52,7 +52,7 @@ public class GroupByWithValueFilterDataSet extends GroupByEngineDataSet {
   private boolean hasCachedTimestamp;
 
   /**
-   * group by batch calculation getTotalDataNumber.
+   * group by batch calculation size.
    */
   private int timeStampFetchSize;
 
@@ -135,8 +135,8 @@ public class GroupByWithValueFilterDataSet extends GroupByEngineDataSet {
    * construct an array of timestamps for one batch of a group by partition calculating.
    *
    * @param timestampArray timestamp array
-   * @param timeArrayLength the current getTotalDataNumber of timestamp array
-   * @return time array getTotalDataNumber
+   * @param timeArrayLength the current size of timestamp array
+   * @return time array size
    */
   private int constructTimeArrayForOneCal(long[] timestampArray, int timeArrayLength)
       throws IOException {
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/query/executor/AggregateEngineExecutor.java b/iotdb/src/main/java/org/apache/iotdb/db/query/executor/AggregateEngineExecutor.java
index 246fcdc..867aaa7 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/query/executor/AggregateEngineExecutor.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/query/executor/AggregateEngineExecutor.java
@@ -60,7 +60,7 @@ public class AggregateEngineExecutor {
   private IExpression expression;
 
   /**
-   * aggregation batch calculation getTotalDataNumber.
+   * aggregation batch calculation size.
    **/
   private int aggregateFetchSize;
 
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/service/Monitor.java b/iotdb/src/main/java/org/apache/iotdb/db/service/Monitor.java
index bd46419..53fb90f 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/service/Monitor.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/service/Monitor.java
@@ -43,7 +43,7 @@ public class Monitor implements MonitorMBean, IService {
     try {
       return FileUtils.sizeOfDirectory(new File(config.getDataDir()));
     } catch (Exception e) {
-      LOGGER.error("meet error while trying to get data getTotalDataNumber.", e);
+      LOGGER.error("meet error while trying to get data size.", e);
       return -1;
     }
   }
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/service/Utils.java b/iotdb/src/main/java/org/apache/iotdb/db/service/Utils.java
index 6627607..75826da 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/service/Utils.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/service/Utils.java
@@ -34,10 +34,10 @@ public class Utils {
   private Utils(){}
 
   /**
-   * convert query data set by fetch getTotalDataNumber.
+   * convert query data set by fetch size.
    *
    * @param queryDataSet -query dataset
-   * @param fetchsize -fetch getTotalDataNumber
+   * @param fetchsize -fetch size
    * @return -convert query dataset
    */
   public static TSQueryDataSet convertQueryDataSetByFetchSize(QueryDataSet queryDataSet,
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/sync/conf/Constans.java b/iotdb/src/main/java/org/apache/iotdb/db/sync/conf/Constans.java
index c1f9856..c810c4c 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/sync/conf/Constans.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/sync/conf/Constans.java
@@ -35,7 +35,7 @@ public class Constans {
   public static final String BACK_UP_DIRECTORY_NAME = "backup";
 
   /**
-   * Split data file , block getTotalDataNumber at each transmission
+   * Split data file , block size at each transmission
    **/
   public static final int DATA_CHUNK_SIZE = 64 * 1024 * 1024;
 
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/utils/AuthUtils.java b/iotdb/src/main/java/org/apache/iotdb/db/utils/AuthUtils.java
index 71df1f3..a150d09 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/utils/AuthUtils.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/utils/AuthUtils.java
@@ -47,7 +47,7 @@ public class AuthUtils {
   }
 
   /**
-   * validate password getTotalDataNumber.
+   * validate password size.
    *
    * @param password user password
    * @throws AuthException Authenticate Exception
@@ -55,7 +55,7 @@ public class AuthUtils {
   public static void validatePassword(String password) throws AuthException {
     if (password.length() < MIN_PASSWORD_LENGTH) {
       throw new AuthException(
-          "Password's getTotalDataNumber must be greater than or equal to " + MIN_USERNAME_LENGTH);
+          "Password's size must be greater than or equal to " + MIN_USERNAME_LENGTH);
     }
   }
 
@@ -68,7 +68,7 @@ public class AuthUtils {
   public static void validateUsername(String username) throws AuthException {
     if (username.length() < MIN_USERNAME_LENGTH) {
       throw new AuthException(
-          "Username's getTotalDataNumber must be greater than or equal to " + MIN_USERNAME_LENGTH);
+          "Username's size must be greater than or equal to " + MIN_USERNAME_LENGTH);
     }
   }
 
@@ -81,7 +81,7 @@ public class AuthUtils {
   public static void validateRolename(String rolename) throws AuthException {
     if (rolename.length() < MIN_ROLENAME_LENGTH) {
       throw new AuthException(
-          "Role name's getTotalDataNumber must be greater than or equal to " + MIN_ROLENAME_LENGTH);
+          "Role name's size must be greater than or equal to " + MIN_ROLENAME_LENGTH);
     }
   }
 
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/utils/FileUtils.java b/iotdb/src/main/java/org/apache/iotdb/db/utils/FileUtils.java
index 4f17a9c..c276f01 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/utils/FileUtils.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/utils/FileUtils.java
@@ -21,7 +21,7 @@ package org.apache.iotdb.db.utils;
 import java.io.File;
 
 /**
- * FileUtils is just used to calculate file attributes like file getTotalDataNumber, including some measurement
+ * FileUtils is just used to calculate file attributes like file size, including some measurement
  * conversions among B, KB, MB etc.
  *
  * @author kangrong
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/utils/MemUtils.java b/iotdb/src/main/java/org/apache/iotdb/db/utils/MemUtils.java
index 3927ab1..9d758a4 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/utils/MemUtils.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/utils/MemUtils.java
@@ -43,7 +43,7 @@ public class MemUtils {
   }
 
   /**
-   * function for getting the record getTotalDataNumber.
+   * function for getting the record size.
    */
   public static long getRecordSize(InsertPlan insertPlan) {
     long memSize = 0;
@@ -90,7 +90,7 @@ public class MemUtils {
   }
 
   /**
-   * function for getting the memory getTotalDataNumber of the given string.
+   * function for getting the memory size of the given string.
    */
   public static long getStringMem(String str) {
     // wide char (2 bytes each) and 64B String overhead
@@ -98,7 +98,7 @@ public class MemUtils {
   }
 
   /**
-   * function for getting the memory getTotalDataNumber of the given data point.
+   * function for getting the memory size of the given data point.
    */
   public static long getDataPointMem(DataPoint dataPoint) {
     // type reference
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/utils/PrimitiveArrayList.java b/iotdb/src/main/java/org/apache/iotdb/db/utils/PrimitiveArrayList.java
index ae942b0..c488d69 100755
--- a/iotdb/src/main/java/org/apache/iotdb/db/utils/PrimitiveArrayList.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/utils/PrimitiveArrayList.java
@@ -33,10 +33,10 @@ public class PrimitiveArrayList {
   private List<Object> values;
   private List<long[]> timestamps;
 
-  private int length; // Total getTotalDataNumber of all objects of current ArrayList
+  private int length; // Total size of all objects of current ArrayList
   private int currentIndex; // current index of array
   private int currentArrayIndex; // current index of element in current array
-  private int currentArraySize; // getTotalDataNumber of current array
+  private int currentArraySize; // size of current array
 
   public PrimitiveArrayList(Class clazz) {
     this.clazz = clazz;
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/utils/PrimitiveArrayListV2.java b/iotdb/src/main/java/org/apache/iotdb/db/utils/PrimitiveArrayListV2.java
index e728cf0..a761199 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/utils/PrimitiveArrayListV2.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/utils/PrimitiveArrayListV2.java
@@ -33,10 +33,10 @@ public class PrimitiveArrayListV2 {
   private List<Object> values;
   private List<long[]> timestamps;
 
-  private int totalDataNumber; // Total getTotalDataNumber of all objects of current ArrayList
+  private int totalDataNumber; // Total data number of all objects of current ArrayList
   private int currentArrayIndex; // current index of array
   private int offsetInCurrentArray; // current index of element in current array
-  private int currentArraySize; // getTotalDataNumber of current array
+  private int currentArraySize; // number of current arrays
 
   public PrimitiveArrayListV2(Class clazz) {
     this.clazz = clazz;
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/utils/TsPrimitiveType.java b/iotdb/src/main/java/org/apache/iotdb/db/utils/TsPrimitiveType.java
index 94131ca..d77704e 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/utils/TsPrimitiveType.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/utils/TsPrimitiveType.java
@@ -75,9 +75,9 @@ public abstract class TsPrimitiveType implements Serializable {
   }
 
   /**
-   * get the getTotalDataNumber of one instance of current class.
+   * get the size of one instance of current class.
    *
-   * @return getTotalDataNumber of one instance of current class
+   * @return size of one instance of current class
    */
   public abstract int getSize();
 
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/writelog/io/LogWriter.java b/iotdb/src/main/java/org/apache/iotdb/db/writelog/io/LogWriter.java
index dbf6a0e..a93cda1 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/writelog/io/LogWriter.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/writelog/io/LogWriter.java
@@ -57,7 +57,7 @@ public class LogWriter implements ILogWriter {
     }
     logBuffer.flip();
     int logSize = logBuffer.limit();
-    // 4 bytes getTotalDataNumber and 8 bytes check sum
+    // 4 bytes size and 8 bytes check sum
 
     checkSummer.reset();
     checkSummer.update(logBuffer);
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/writelog/io/SingleFileLogReader.java b/iotdb/src/main/java/org/apache/iotdb/db/writelog/io/SingleFileLogReader.java
index 752d8c3..bacb8f5 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/writelog/io/SingleFileLogReader.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/writelog/io/SingleFileLogReader.java
@@ -38,7 +38,7 @@ import org.slf4j.LoggerFactory;
 public class SingleFileLogReader implements ILogReader {
 
   private static final Logger logger = LoggerFactory.getLogger(SingleFileLogReader.class);
-  public static final int LEAST_LOG_SIZE = 12; // getTotalDataNumber + checksum
+  public static final int LEAST_LOG_SIZE = 12; // size + checksum
 
   private DataInputStream logStream;
   private String filepath;
diff --git a/iotdb/src/test/java/org/apache/iotdb/db/monitor/collector/FileSizeTest.java b/iotdb/src/test/java/org/apache/iotdb/db/monitor/collector/FileSizeTest.java
index ca053db..0f60f9c 100644
--- a/iotdb/src/test/java/org/apache/iotdb/db/monitor/collector/FileSizeTest.java
+++ b/iotdb/src/test/java/org/apache/iotdb/db/monitor/collector/FileSizeTest.java
@@ -79,12 +79,12 @@ public class FileSizeTest {
       isWriteSuccess = false;
       e.printStackTrace();
     }
-    // calculate the delta of data dir file getTotalDataNumber
+    // calculate the delta of data dir file size
     dataSizeAfter = FileSize.getInstance().getFileSizesInByte().get(FileSizeConstants.DATA);
     long deltaSize = dataSizeAfter - dataSizeBefore;
 
     if (isWriteSuccess) {
-      //check if the the delta of data dir file getTotalDataNumber is equal to the written content getTotalDataNumber in byte
+      //check if the the delta of data dir file size is equal to the written content size in byte
       assertEquals(contentInBytes.length, deltaSize);
     } else {
       assertEquals(0, deltaSize);
diff --git a/iotdb/src/test/java/org/apache/iotdb/db/sql/SQLParserTest.java b/iotdb/src/test/java/org/apache/iotdb/db/sql/SQLParserTest.java
index 9260f06..03a09db 100644
--- a/iotdb/src/test/java/org/apache/iotdb/db/sql/SQLParserTest.java
+++ b/iotdb/src/test/java/org/apache/iotdb/db/sql/SQLParserTest.java
@@ -388,7 +388,7 @@ public class SQLParserTest {
   // recursivePrintSon(astTree, rec);
   //
   // int i = 0;
-  // while (i <= rec.getTotalDataNumber() - 1) {
+  // while (i <= rec.size() - 1) {
   // assertEquals(rec.get(i), ans.get(i));
   // i++;
   // }
diff --git a/iotdb/src/test/java/org/apache/iotdb/db/sync/test/RandomNum.java b/iotdb/src/test/java/org/apache/iotdb/db/sync/test/RandomNum.java
index 6aa0c74..125e9d3 100644
--- a/iotdb/src/test/java/org/apache/iotdb/db/sync/test/RandomNum.java
+++ b/iotdb/src/test/java/org/apache/iotdb/db/sync/test/RandomNum.java
@@ -54,7 +54,7 @@ public class RandomNum {
   /**
    * get random text consisting of lowercase letters and numbers.
    *
-   * @param length -the getTotalDataNumber of random text
+   * @param length -the size of random text
    */
   public static String getRandomText(int length) {
 
diff --git a/iotdb/src/test/java/org/apache/iotdb/db/writelog/IoTDBLogFileSizeTest.java b/iotdb/src/test/java/org/apache/iotdb/db/writelog/IoTDBLogFileSizeTest.java
index 97686c5..c6a0905 100644
--- a/iotdb/src/test/java/org/apache/iotdb/db/writelog/IoTDBLogFileSizeTest.java
+++ b/iotdb/src/test/java/org/apache/iotdb/db/writelog/IoTDBLogFileSizeTest.java
@@ -137,7 +137,7 @@ public class IoTDBLogFileSizeTest {
 
     }
     System.out.println(
-        "Max getTotalDataNumber of bufferwrite wal is " + MemUtils.bytesCntToStr(maxLength[0]) + " after "
+        "Max size of bufferwrite wal is " + MemUtils.bytesCntToStr(maxLength[0]) + " after "
             + runtime + "ms continuous writing");
   }
 
@@ -197,7 +197,7 @@ public class IoTDBLogFileSizeTest {
 
     }
     System.out.println(
-        "Max getTotalDataNumber of overflow wal is " + MemUtils.bytesCntToStr(maxLength[0]) + " after " + runtime
+        "Max size of overflow wal is " + MemUtils.bytesCntToStr(maxLength[0]) + " after " + runtime
             + "ms continuous writing");
   }
 
diff --git a/iotdb/src/test/java/org/apache/iotdb/db/writelog/PerformanceTest.java b/iotdb/src/test/java/org/apache/iotdb/db/writelog/PerformanceTest.java
index 848a2bd..1d68e39 100644
--- a/iotdb/src/test/java/org/apache/iotdb/db/writelog/PerformanceTest.java
+++ b/iotdb/src/test/java/org/apache/iotdb/db/writelog/PerformanceTest.java
@@ -103,7 +103,7 @@ public class PerformanceTest {
         logNode.forceSync();
         System.out.println("forceWalPeriodInMs = " + config.getForceWalPeriodInMs());
         System.out.println(
-            3000000 + " logs use " + (System.currentTimeMillis() - time) + " ms at batch getTotalDataNumber "
+            3000000 + " logs use " + (System.currentTimeMillis() - time) + " ms at batch size "
                 + config.getFlushWalThreshold());
 
         logNode.delete();