[Load] Reject device paths with empty nodes before database auto-creation#18307
Open
Caideyipi wants to merge 2 commits into
Open
[Load] Reject device paths with empty nodes before database auto-creation#18307Caideyipi wants to merge 2 commits into
Caideyipi wants to merge 2 commits into
Conversation
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.
Description
A tree-model TsFile may contain a segmented device ID with an empty path node, for example
root.represented as["root", ""]. LOAD previously copied those segments into aPartialPathwithout structural validation and could derive an invalidroot.database path.This PR validates every device node before LOAD queries ConfigNode or attempts database auto-creation. Null or empty nodes now fail locally with a clear illegal-path error, preventing malformed TsFiles from creating invalid metadata.
The ConfigNode-wide database-path guard is handled separately in #18308.
Tests
mvn spotless:apply -pl iotdb-core/datanodeLoadTsFileAnalyzerTestcompiled against the current module dependencies and run with JUnitCore (6 tests passed). The normal DataNode Maven lifecycle is currently blocked locally by unrelated stale generated Freemarker sources and SNAPSHOT dependency mismatches.This PR has:
Key changed/added class
TreeSchemaAutoCreatorAndVerifier