Forward SegmentDirectoryLoaderContext in DefaultSegmentDirectoryLoader#18863
Merged
xiangfu0 merged 1 commit intoJun 27, 2026
Merged
Conversation
PR apache#18806 inadvertently dropped the segmentLoaderContext argument when constructing SegmentLocalFSDirectory, leaving SingleFileIndexDirectory's _segmentDirectoryLoaderContext field null. This causes the task-config propagation logic added in PR apache#18264 (SingleFileIndexDirectory#serializeTaskConfigToJsonFromContext) to short-circuit at its first guard, so task.config.json is never injected into EmptyIndexBuffer.properties and downstream consumers silently fall back to ambient credential defaults. Restore the prior behavior by constructing SegmentMetadataImpl and passing both the metadata and the loader context to SegmentLocalFSDirectory's 4-arg constructor.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #18863 +/- ##
============================================
+ Coverage 37.16% 37.18% +0.01%
Complexity 1321 1321
============================================
Files 3393 3393
Lines 211305 211306 +1
Branches 33226 33226
============================================
+ Hits 78541 78578 +37
+ Misses 125557 125519 -38
- Partials 7207 7209 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
xiangfu0
approved these changes
Jun 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
#18806 ("Replace
segmentDirectoryConfigsmap withReadModeinSegmentDirectoryLoaderContext") refactoredDefaultSegmentDirectoryLoader.loadand inadvertently dropped thesegmentLoaderContextargument when constructingSegmentLocalFSDirectory:The 2-arg
SegmentLocalFSDirectory(File, ReadMode)constructor sets the underlyingSingleFileIndexDirectory#_segmentDirectoryLoaderContexttonull. This silently breaks the task-config propagation introduced in #18264 —SingleFileIndexDirectory#serializeTaskConfigToJsonFromContext()short-circuits at its first guard:As a result,
task.config.jsonis never injected intoEmptyIndexBuffer.properties, and downstream consumers that depend on the table's task configuration to resolve their own configuration silently fall back to ambient defaults