clintropolis commented on code in PR #19662:
URL: https://github.com/apache/druid/pull/19662#discussion_r3539782479
##########
processing/src/main/java/org/apache/druid/segment/DictionaryEncodedColumnMerger.java:
##########
@@ -154,7 +154,10 @@ public DictionaryEncodedColumnMerger(
@Override
public void markAsParent()
{
- final File tmpOutputFilesDir = new File(segmentBaseDir, "tmp_" +
outputName + "_merger");
+ // outputName can carry a bundle-prefixed logical name (e.g.
"__base/<col>"); flatten any separators so the scratch
+ // dir stays a single flat entry under segmentBaseDir rather than creating
an intermediate subdirectory that would
+ // be orphaned when the leaf is deleted (and later rejected by the v10
flat-directory no-zip segment push path).
+ final File tmpOutputFilesDir = new File(segmentBaseDir, "tmp_" +
outputName.replace('/', '_') + "_merger");
Review Comment:
i think instead of flattening, I think it would probably be safer to try to
delete the whole path we created if non-empty (so in
`PersistedIdConversions#close`).
There is some code that does this in
`SegmentLocalCacheManager#cleanupLegacyCacheLocation`, which recursively
deletes its way back up to some base path, which i think could be moved to
`FileUtils` or something.
--
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]