J-HowHuang opened a new pull request, #19861: URL: https://github.com/apache/pinot/pull/19861
## Description Segment reload can come with some cost. For example in upsert or dedup table we need to call `handleUpsert` or `handleDedup`, also the construction of a new `SegmentDirectory` can also be expensive depending on the implementation. We have a way to reload only specified segments by their names. But to acquire the list of segments that need reload requires extra cost too (one way is via the `isStale` API). Having this `onlyIfNeeded` flag integrates the check into the reload flow itself, so that we don't reload a segment if their current loaded segment reports no need. And because this flag is optional and default false, any implementation that fails to capture the reload need in `isReloadNeeded` check can always reload with this flag off. -- 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]
