swaminathanmanish commented on PR #14451: URL: https://github.com/apache/pinot/pull/14451#issuecomment-2509678253
> The core feature in this PR is a function `BaseTableDataManager.getSegmentsForRefresh` which finds all the segments of a table that requires a refresh. It accepts a Table Config and Schema and compares that with the current state of a segment. > > This functionality will be used by other components such as minion tasks to decide which segments have to be refreshed. > > The function is exposed by the following server API: > > ``` > /tables/{tableName}/segments/needRefresh > > Response is: > [ > { > "segmentName":"...", > "reason":"..." > }, > ... > ] > ``` > > **segmentName** is the name of the segment. **reason** contains a simple message for why the segment needs to be refreshed. > > There is also a controller API that consolidates the responses from all servers. > > ``` > /segments/orders_OFFLINE/needRefresh > > Response is: > { > "<server name>" : [{ > "segmentName":"...", > "reason":"..." > }], > ... > ] > > Example: > > { > "http://192.168.0.111:7500/tables/orders_OFFLINE/segments/needRefresh__1": [ > { > "segmentName": "orders_OFFLINE_0", > "reason": "column added" > } > ] > } > ``` > > Fix for #14450 Please update description to getStaleSegments -- 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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org