HTHou opened a new pull request, #9218:
URL: https://github.com/apache/iotdb/pull/9218

   ## Description
   
   When set Max_heap_size=2G and insert data of 7 years. The flush thread will 
be stuck. 
   
   There is a simple way to reproduce. 
   
   Set max_heap_size of data node to 200M, set write_memory_proportion to 
10000000:1.
   
   Then execute the following sqls:
   
   ```sql
   insert into root.sg.d1(time,s1) values(1,2);
   flush;
   insert into root.sg.d1(time,s1) values(2,2);
   insert into root.sg.d1(time,s1) values(604800001,2);
   flush;
   ```
   Finally, you will see the last flush cannot execute successfully.
   
   
   ## Reason
   
   The `evictOldPartition` method in `TimePartitionManager` always peek the 
first TimePartitionInfo in the TreeSet in the while loop. However, the memSize 
of the TimePartitionInfo may be 0. In this case, the loop won't be ended.
   
   ## Solution
   
   Change the `treeSet.first()` to `treeSet.pollFirst()`.
   


-- 
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: [email protected]

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

Reply via email to