shuwenwei commented on PR #19035:
URL: https://github.com/apache/iotdb/pull/19035#issuecomment-6517460325

   I would like to keep this PR scoped to the `INSERT INTO` ingress only.
   
   The invariant violation originates because the internal `INSERT INTO` path 
bypasses the sorting performed by the Session API and constructs an 
`InsertTabletStatement` whose `times` are not sorted, although 
`InsertTabletStatement` documents that this invariant must hold. The minimal 
fix is therefore to restore that invariant inside 
`InsertTabletStatementGenerator` before the statement leaves the `INSERT INTO` 
path.
   
   I do not think this PR should add defensive behavior to the general storage 
write path or to the query read path. Please remove the `DataRegion.split()` 
changes, the `SeriesScanUtil` changes, and the tests introduced solely for 
those defensive paths. Keep the tablet sorting in 
`InsertTabletStatementGenerator`, its unit tests, and an end-to-end `INSERT 
INTO ... SELECT` regression test proving that this path no longer produces 
incorrect results.
   
   Once `INSERT INTO` generates a compliant sorted statement, it will no longer 
create the invalid sequence-file layout. Existing corrupted files and unsorted 
data from other ingress paths are separate concerns and should be handled in 
dedicated changes rather than partially masked in this PR.


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