clintropolis commented on code in PR #20267:
URL: https://github.com/apache/druid/pull/20267#discussion_r3983480354
##########
server/src/main/java/org/apache/druid/segment/loading/SegmentLocalCacheManager.java:
##########
@@ -1076,6 +1072,11 @@ private DataSegment loadPartial(DataSegment dataSegment)
throws SegmentLoadingEx
return dataSegment;
}
+ // Committed to attempting the rule now. If a stale non-partial cache
entry sits at this segment id (a
+ // complete created by a prior acquireSegment while
virtualStoragePartialDownloadsEnabled=false, for example),
+ // evict it before any partial-entry lookup or reservation.
+ evictStaleNonPartialWeakEntry(dataSegment.getId());
Review Comment:
I think i'm going to solve this in a follow-up to make it impossible for
this to happen by migrating non-partial v10 files into partial format during
bootstrap, which would make a config switch convert the files on disk. There
are a few similar operations already happening (migrating legacy deeply nested
structure to flat structure, removing complete entries in partial mode if the
info file indicates it should be partial, etc), so i think an up front cost to
eliminate weird things that wouldn't happen in fresh flows is worth the
complexity it eliminates of trying to handle it everywhere.
--
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]