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

   ## Summary
   - Use the tablet effective `rowCount` when constructing table-model redirect 
endpoints.
   - Add a regression test with spare backing-array capacity beyond the valid 
rows.
   
   ## Problem
   `Tablet` backing arrays may contain more slots than the number of valid rows 
represented by `rowCount`. `RelationalInsertTabletNode.splitByReplicaSet()` 
iterated over `times.length`, while device IDs are computed for `rowCount` 
rows. This could process rows outside the valid range and throw 
`ArrayIndexOutOfBoundsException` during write planning.
   
   ## Fix
   Build the redirect node list using `rowCount`, matching the rows that are 
actually part of the tablet.
   
   ## Example
   Before: a relational tablet with `rowCount = 2` and four timestamp slots 
could fail with `ArrayIndexOutOfBoundsException` during redirect construction.
   After: only the two valid rows produce redirect entries and planning 
completes normally.
   
   ## Validation
   - Ran `./mvnw spotless:apply -pl iotdb-core/datanode`.
   - Tests and compilation were not run locally; CI will validate them.


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