Skip to content

fix: projections on base table columns result in failed indexing when using unzipped segments#19662

Open
capistrant wants to merge 2 commits into
apache:masterfrom
capistrant:v10-bug
Open

fix: projections on base table columns result in failed indexing when using unzipped segments#19662
capistrant wants to merge 2 commits into
apache:masterfrom
capistrant:v10-bug

Conversation

@capistrant

Copy link
Copy Markdown
Contributor

Description

Was experimenting locally while reviewing #19657 and ran into ingest failures when running the wikipedia batch ingestion example with a rollup projection added on isRobot column.

Release note

n/a


Key changed/added classes in this PR
  • DictionaryEncodedColumnMerger

This PR has:

  • been self-reviewed.
  • added documentation for new or modified features or behaviors.
  • a release note entry in the PR description.
  • added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
  • added or updated version, license, or notice information in licenses.yaml
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage is met.
  • added integration tests.
  • been tested in a test Druid cluster.

// 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");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Create a static file utils method for recursively deleting a target dir as well as any empty anscestors.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants