You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2022/09/26 03:54:53 UTC

[GitHub] [iotdb] MarcosZyk commented on a diff in pull request #7428: [IOTDB-4519] Fix existing measurement check during auto creating schema

MarcosZyk commented on code in PR #7428:
URL: https://github.com/apache/iotdb/pull/7428#discussion_r979540494


##########
server/src/main/java/org/apache/iotdb/db/mpp/plan/analyze/ClusterSchemaFetcher.java:
##########
@@ -476,9 +474,7 @@ private List<MeasurementPath> executeInternalCreateTimeseriesStatement(
     for (TSStatus subStatus : executionResult.status.subStatus) {
       if (subStatus.code == TSStatusCode.MEASUREMENT_ALREADY_EXIST.getStatusCode()) {
         alreadyExistingMeasurements.add(
-            (MeasurementPath)
-                PathDeserializeUtil.deserialize(
-                    ByteBuffer.wrap(subStatus.getMessage().getBytes())));
+            MeasurementPath.parseDataFromString(subStatus.getMessage()));

Review Comment:
   Yes. When trying auto creating schema, the timeseries may be concurrently created by other threads or requests. The subStatus takes the existing schema info back without further schema fetch query.



-- 
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: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org