FrankChen021 commented on code in PR #20073:
URL: https://github.com/apache/druid/pull/20073#discussion_r3853030931
##########
server/src/main/java/org/apache/druid/segment/loading/SegmentLocalCacheManager.java:
##########
@@ -950,6 +958,15 @@ private ReservedPartial findOrReservePartial(DataSegment
dataSegment, SegmentRan
{
final ReservedPartial existing =
findExistingPartialWithHold(dataSegment.getId());
if (existing != null) {
+ if (!existing.metadata().isMounted()) {
+ // rewrite the info file if it is missing
+ try {
+ storeInfoFile(dataSegment);
Review Comment:
[P2] Restored info files lose their cleanup hook
A failed mount consumes its one-shot onUnmount hook while deleting the info
file. Reusing that unmounted entry recreates the file here but never registers
a new hook, so eviction leaves stale metadata and can cause bootstrap to treat
the headerless directory as a complete segment. Re-register the cleanup hook
when restoring the file.
--
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]