qiaojialin commented on a change in pull request #1480:
URL: https://github.com/apache/incubator-iotdb/pull/1480#discussion_r454337303



##########
File path: 
server/src/main/java/org/apache/iotdb/db/engine/storagegroup/TsFileProcessor.java
##########
@@ -683,10 +715,16 @@ public void flushOneMemTable() {
         RestorableTsFileIOWriter curWriter;
         if (config.isEnableVm()) {
           logger.info("[Flush] flush a vm");
-          File newVmFile = createNewVMFile(tsFileResource);
-          vmTsFileResources.add(new TsFileResource(newVmFile));
+          File newVmFile = createNewVMFile(tsFileResource, 0);
+          if (vmWriters.size() <= 0) {
+            vmWriters.add(new ArrayList<>());
+          }
+          if (vmTsFileResources.size() <= 0) {
+            vmTsFileResources.add(new ArrayList<>());
+          }

Review comment:
       are they consistent and can be put together?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to