FrankChen021 commented on code in PR #20617:
URL: https://github.com/apache/druid/pull/20617#discussion_r4325033776


##########
server/src/main/java/org/apache/druid/segment/loading/PartialSegmentMetadataCacheEntry.java:
##########
@@ -1192,6 +1204,18 @@ private Optional<Segment> 
buildSegmentWithExtraClose(@Nullable Closeable extraOn
         );
       }
       index = queryableIndex;
+      if (ruleHeldOnly) {
+        // Snapshot the selection (empty when no rule is applied). It names 
physical bundles, since the cache manager
+        // resolves it when applying the rule, while the planner asks by 
logical name, so resolve each requested name
+        // the same way the bundle acquirer does: on a legacy root-only 
segment every name maps to the root bundle.
+        final Set<String> selected = ruleSelectedBundleNames;
+        final PartialSegmentFileMapperV10 mapper = fileMapper;
+        servableBundles = bundleName -> selected.contains(

Review Comment:
   [P2] Resolve legacy bundle names before prefetch planning
   
   **Finding:** The predicate resolves logical names to the physical __root__ 
bundle only for eligibility. The subsequent PrefetchBundle still carries the 
logical projection/group/base name; when columnFiles is absent, 
planParallelFetchBundle returns no fetches for that unknown name, so an 
unresident selected bundle is mounted without being downloaded and cursor 
materialization can fail.
   
   **Suggestion:** Propagate the resolved physical bundle name into prefetch 
planning, or make planParallelFetchBundle use the same root-only fallback; add 
an on-demand legacy fixture with columnFiles absent.



-- 
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]

Reply via email to