jixuan1989 commented on a change in pull request #2468:
URL: https://github.com/apache/iotdb/pull/2468#discussion_r579822153
##########
File path: server/src/main/java/org/apache/iotdb/db/metadata/MManager.java
##########
@@ -1892,29 +1890,30 @@ public MNode
getSeriesSchemasAndReadLockDevice(InsertPlan plan) throws MetadataE
}
public MeasurementMNode getOrCreateMeasurementMNode(
Review comment:
IMO, This design needs to be reconsidered.
`public MeasurementMNode getOrCreateMeasurementMNode()` is a public methd
and create a measurement node actually does not depend on an `InsertPlan`.
Instead, it only depends on `DataType`. Therefore, the method's parameter
should be `TSDataType dataType`, rather than InsertPlan. (If you want to avoid
code duplication, a private method may be needed).
About method `protected void autoCreateSchemaOrNot`: this method's logic is
simply enough, why not just create a method `protected void autoCreateSchema`
and move `autoCreateSchemaOrNot ` outside?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]