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

   ## Description
   
   When an insertRecordsOfOneDevice write request contains data from two time 
partitions 0 and 1, assuming that the first data is sequential data from a 0 
partition, the initial value of isSequence is false. The isSequence is set to 
true after the code block of line 2794 is entered and the first data is written 
to the sequential space of the 0 partition. If the second data is an 
out-of-order data in the 1 partition, isSequence is still true, and the 
out-of-order data in the 2794 line is not entered into the out-of-order 
judgment, and the out-of-order data will be written into the order space of the 
1 partition. This causes timestamp overlaps between sequential space files in 
the 1 partition.
   
   
![image](https://github.com/apache/iotdb/assets/25913899/875f1a79-ef98-4d6b-a828-6565dbae9ffe)
   
   To fix it, when doing insertRecordsOfOneDeviceNode split, the different time 
of the same DataRegion partition data split into different sub 
insertRecordsOfOneDeviceNode, So that the same insertRecordsOfOneDeviceNode 
DataRegion to not appear across time partition, so as to avoid this situation.
   
   
   ## How to test
   1. Change`time_partition_interval=100`, 
`max_inner_compaction_candidate_file_num=2`
   2. execute the following sql
   ```sql
   insert into root.sg1.d1(time,s1) values(150,1)
   flush
   insert into root.sg1.d1(time,s1) values(1,1),(104,2)
   flush
   ```
   3. execute query `select * from root.**`
   


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