xiangfu0 opened a new pull request, #20466: URL: https://github.com/apache/pinot/pull/20466
Follow-up to #20448. Realtime segments sealed before that fix still store `totalNumberOfEntries = numDocs` for raw multi-value columns, and two reload paths trusted it: adding a range index failed with `IndexOutOfBoundsException`, and enabling a dictionary left the stale count in the metadata so the new forward index was read wrongly. Now the range index handler recounts the values when the stored count equals the number of docs (one extra scan, only for those columns) and saves the corrected count, and the raw-to-dictionary conversion writes the count it already scanned. Testing: the new `RawMultiValueStaleTotalEntriesReloadTest` fails on both paths without the fix and passes with it, along with the existing `RangeIndexHandler*Test`, `ForwardIndexHandler*Test` and `SegmentPreProcessorTest`. Labels: `bugfix` --- _Generated by [Claude Code](https://claude.ai/code)_ -- 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]
