LuciferYang opened a new pull request, #13550: URL: https://github.com/apache/gluten/pull/13550
## What changes are proposed in this pull request? `VeloxRssSortShuffleWriter::reclaimFixedSize` cleared the buffered batches and the byte counter but not `stringBuffers_`, the set of string buffers already counted. After a reclaim, a string buffer that was still alive, or a new one at a reused address, was skipped as already counted, so the next batches under-reported their size and the writer evicted later than its threshold. Reclaim now calls `resetBatches()`, which clears all three, as the normal eviction path does. Fixes #13544. ## How was this patch tested? Added `calculateBatchesSizeAfterReclaim` to `VeloxRssSortShuffleWriterTest`. It writes a batch whose string buffer is shared, reclaims, writes another batch using the same buffer, and checks the counted bytes. Before this change the second batch was short by the buffer's capacity. ## Was this patch authored or co-authored using generative AI tooling? Yes. Generated-by: Claude Opus. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
