Caideyipi commented on PR #18276: URL: https://github.com/apache/iotdb/pull/18276#issuecomment-5044701977
Added regression coverage in commit [`27e985663b5`](https://github.com/apache/iotdb/commit/27e985663b5) for the two memory-accounting issues noted above. Both tests intentionally fail on the current PR head: ```text TsFileProcessorTest#testAlignedSparseRowDoesNotChargeUnallocatedPrimitiveArrayOnNewBlock expected:<272> but was:<0> AlignedTVListTest#testCalculateRamSizeExcludesUnallocatedPrimitiveArrays expected:<2384> but was:<3440> ``` The second mismatch is 1056 bytes, exactly two unallocated INT64 primitive arrays (2 blocks x 528 bytes). The first shows that a sparse row and a dense row crossing the same block boundary are currently charged the same increment, although the dense row materializes one additional INT32 primitive array (272 bytes). Besides `calculateRamSize()`, the dense per-block charge appears in all three write paths in `TsFileProcessor`: single-row around line 852, `InsertRows` around line 951, and Tablet around line 1149. The regression tests should turn green once those paths charge only primitive arrays that are actually materialized. -- 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]
