You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2021/10/19 10:22:26 UTC

[GitHub] [iotdb] THUMarkLau opened a new pull request #4186: [To master] Fix double close in CompactionUtils

THUMarkLau opened a new pull request #4186:
URL: https://github.com/apache/iotdb/pull/4186


   # Description
   During level compaction, the write stream of target file sometimes is closed unexpectedly.The error log is shown below.
   ![image](https://user-images.githubusercontent.com/37140360/137891370-94d5154e-2173-41de-8f6f-98f74781f775.png)
   
   # Analysis
   By consulting related information, we know that when an OuputStream is closed and then written, there will be a Stream Closed exception. We troubleshoot the problem based on this idea. But in the process of level compaction execution, tasks are executed in a single thread in a static function (as shown in the figure).
   ![1](https://user-images.githubusercontent.com/37140360/137891407-0ee4a8dc-c826-451b-ae23-afff07c00a8e.png)
   
    Moreover, the Writer of each target file is declared in a function, so this Writer and its corresponding Stream are local variables which cannot be accessed outside this function. In Writer's endFile function, Writer.close will be called once, and all the contents in the Writer buffer will be written to the file at this time. After calling endFile, the close function of Writer was manually called again. Theoretically, the second close does not produce any exceptions, because the buffer has been emptied and the Writer will not write anything to the file. But because we can't find other reasons, we can only attribute the cause of this exception to the two calls of the close function for the time being.


-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] coveralls commented on pull request #4186: [To master] Fix double close in CompactionUtils

Posted by GitBox <gi...@apache.org>.
coveralls commented on pull request #4186:
URL: https://github.com/apache/iotdb/pull/4186#issuecomment-946613513


   
   [![Coverage Status](https://coveralls.io/builds/43604178/badge)](https://coveralls.io/builds/43604178)
   
   Coverage increased (+0.01%) to 67.457% when pulling **a75c01172d01f5f4ab6050c0f2a34ef68f9a7e2d on THUMarkLau:to_master_fix_double_close** into **e4b7f64deb54b3fc186424cf969a68bff23a6fc7 on apache:master**.
   


-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] qiaojialin merged pull request #4186: [IOTDB-1741] Fix double close in CompactionUtils

Posted by GitBox <gi...@apache.org>.
qiaojialin merged pull request #4186:
URL: https://github.com/apache/iotdb/pull/4186


   


-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org