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/11/18 02:33:56 UTC

[GitHub] [iotdb] HTHou commented on a diff in pull request #8037: [IOTDB-4668] Add Database name length constraint

HTHou commented on code in PR #8037:
URL: https://github.com/apache/iotdb/pull/8037#discussion_r1025929018


##########
server/src/main/java/org/apache/iotdb/db/mpp/plan/execution/config/executor/ClusterConfigTaskExecutor.java:
##########
@@ -197,6 +199,13 @@ public static ClusterConfigTaskExecutor getInstance() {
   public SettableFuture<ConfigTaskResult> setStorageGroup(
       SetStorageGroupStatement setStorageGroupStatement) {
     SettableFuture<ConfigTaskResult> future = SettableFuture.create();
+    String storageGroupPath = setStorageGroupStatement.getStorageGroupPath().getFullPath();
+    if (storageGroupPath.length() > MAX_DATABASE_NAME_LENGTH) {
+      future.setException(
+          new IllegalPathException(
+              storageGroupPath, "the length of database name shall not exceed 64."));

Review Comment:
   ```suggestion
                 storageGroupPath, "the length of database name shall not exceed " + MAX_DATABASE_NAME_LENGTH));
   ```



-- 
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