Caideyipi commented on code in PR #18314:
URL: https://github.com/apache/iotdb/pull/18314#discussion_r3680478954
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/load/LoadTsFileAnalyzer.java:
##########
@@ -114,6 +114,8 @@ public class LoadTsFileAnalyzer implements AutoCloseable {
private String databaseForTableData;
private final boolean isAsyncLoad;
private final boolean isVerifySchema;
+ private final boolean isAutoCreateSchemaAllowed;
+ private final boolean isAutoCreateSchema;
Review Comment:
Renamed the two states in 4ee2fbef3b4: isAutoCreateSchemaRequested is the
statement/attribute request, while isAutoCreateSchemaEnabled is the effective
local setting after applying the server config. The related accessors and tests
now use the same distinction.
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/schema/ISchemaFetcher.java:
##########
@@ -121,6 +123,21 @@ ISchemaTree fetchSchemaListWithAutoCreate(
List<Boolean> aligned,
MPPQueryContext context);
+ default ISchemaTree fetchSchemaList(
+ final List<PartialPath> devicePaths,
+ final List<String[]> measurementsList,
+ final MPPQueryContext context) {
+ DataNodeSchemaLockManager.getInstance()
+ .takeReadLock(context, SchemaLockType.VALIDATE_VS_DELETION_TREE);
+ final PathPatternTree patternTree = new PathPatternTree();
+ for (int i = 0; i < devicePaths.size(); i++) {
+ for (final String measurement : measurementsList.get(i)) {
+ patternTree.appendFullPath(devicePaths.get(i), measurement);
+ }
+ }
+ return fetchSchema(patternTree, true, context, true);
+ }
Review Comment:
Added the lifecycle comment in 4ee2fbef3b4. The lock is recorded in
MPPQueryContext and intentionally remains held through execution; Coordinator
releases the recorded schema read locks from its finally block. The focused
LoadTsFileAnalyzerTest suite passes (7 tests).
--
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]