jt2594838 commented on a change in pull request #460:
URL: https://github.com/apache/iotdb/pull/460#discussion_r537409254



##########
File path: 
server/src/main/java/org/apache/iotdb/db/engine/storagegroup/TsFileProcessor.java
##########
@@ -694,18 +703,26 @@ public void flushOneMemTable() {
         MemTableFlushTask flushTask = new MemTableFlushTask(memTableToFlush, 
writer, storageGroupName);
         flushTask.syncFlushMemTable();
       } catch (Exception e) {
-        logger.error("{}: {} meet error when flushing a memtable, change 
system mode to read-only",
-            storageGroupName, tsFileResource.getTsFile().getName(), e);
-        IoTDBDescriptor.getInstance().getConfig().setReadOnly(true);
-        try {
-          logger.error("{}: {} IOTask meets error, truncate the corrupted 
data", storageGroupName,
-              tsFileResource.getTsFile().getName(), e);
-          writer.reset();
-        } catch (IOException e1) {
-          logger.error("{}: {} Truncate corrupted data meets error", 
storageGroupName,
-              tsFileResource.getTsFile().getName(), e1);
+        if (writer == null) {
+          logger.info("{}: {} is closed during flush, abandon flush task",

Review comment:
       It is normal, as currently only loading a file that overlaps it may 
close it during flush.




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to