klsince commented on PR #9306: URL: https://github.com/apache/pinot/pull/9306#issuecomment-1239942838
> What will happen if the tier is updated when server is restarting? Server won't be able to find the old local segment, and the old segment will left as orphan and never be cleaned up. Good question. Although will add a cleanup mechanism for orphan segments as part of this work, it's still good to find and reuse the existing segment on disk under such race condition, to avoid orphan segment and downloading raw segment. But as to the ideas `persist segment tier over server restarts` or `check all previous tiers`, they are subject to another race condition: the dataDir for tier is updated in TierConfig in TableConfig when server restarts. So instead, we may simply persist the segmentDir path over restarts, and check it out when calling addOrReplaceSegment(). This check is supposed to be done in TierBasedSegmentDirectoryLoader as those race conditions are specific to it. Will think a bit more on this. -- 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]
