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/05/09 01:21:56 UTC

[GitHub] [iotdb] SpriCoder opened a new pull request, #5831: [IOTDB-3119] extend set storage group

SpriCoder opened a new pull request, #5831:
URL: https://github.com/apache/iotdb/pull/5831

   See more details: https://issues.apache.org/jira/browse/IOTDB-3119
   I have tested locally(3-confignode, 3-datanode):
   <img width="937" alt="image" src="https://user-images.githubusercontent.com/46039728/167325171-c951d929-e0d1-4e13-8acd-821a4771a97e.png">
   


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


[GitHub] [iotdb] qiaojialin merged pull request #5831: [IOTDB-3119] extend set storage group

Posted by GitBox <gi...@apache.org>.
qiaojialin merged PR #5831:
URL: https://github.com/apache/iotdb/pull/5831


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


[GitHub] [iotdb] SpriCoder commented on a diff in pull request #5831: [IOTDB-3119] extend set storage group

Posted by GitBox <gi...@apache.org>.
SpriCoder commented on code in PR #5831:
URL: https://github.com/apache/iotdb/pull/5831#discussion_r867796577


##########
antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/IoTDBSqlParser.g4:
##########
@@ -75,7 +75,11 @@ syncStatement
 
 // Create Storage Group
 setStorageGroup
-    : SET STORAGE GROUP TO prefixPath
+    : SET STORAGE GROUP TO prefixPath (WITH sgAttributeClause (COMMA sgAttributeClause)*)?
+    ;
+
+sgAttributeClause
+    : (TTL | SCHEMA_REPLICATION_FACTOR | DATA_REPLICATION_FACTOR | TIME_PARTITION_INTERVAL) '=' INTEGER_LITERAL

Review Comment:
   Already fixed.



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


[GitHub] [iotdb] MarcosZyk commented on a diff in pull request #5831: [IOTDB-3119] extend set storage group

Posted by GitBox <gi...@apache.org>.
MarcosZyk commented on code in PR #5831:
URL: https://github.com/apache/iotdb/pull/5831#discussion_r867666239


##########
antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/IoTDBSqlParser.g4:
##########
@@ -75,7 +75,11 @@ syncStatement
 
 // Create Storage Group
 setStorageGroup
-    : SET STORAGE GROUP TO prefixPath
+    : SET STORAGE GROUP TO prefixPath (WITH sgAttributeClause (COMMA sgAttributeClause)*)?
+    ;
+
+sgAttributeClause
+    : (TTL | SCHEMA_REPLICATION_FACTOR | DATA_REPLICATION_FACTOR | TIME_PARTITION_INTERVAL) '=' INTEGER_LITERAL

Review Comment:
   use full name ```storageGroup```



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


[GitHub] [iotdb] qiaojialin commented on a diff in pull request #5831: [IOTDB-3119] extend set storage group

Posted by GitBox <gi...@apache.org>.
qiaojialin commented on code in PR #5831:
URL: https://github.com/apache/iotdb/pull/5831#discussion_r867876802


##########
server/src/main/java/org/apache/iotdb/db/mpp/plan/execution/config/SetStorageGroupTask.java:
##########
@@ -82,9 +83,12 @@ public ListenableFuture<ConfigTaskResult> execute() {
       }
     } else {
       try {
-        LocalConfigNode.getInstance()
-            .setStorageGroup(setStorageGroupStatement.getStorageGroupPath());
-      } catch (MetadataException e) {
+        LocalConfigNode localConfigNode = LocalConfigNode.getInstance();
+        localConfigNode.setStorageGroup(setStorageGroupStatement.getStorageGroupPath());
+        localConfigNode.setTTL(
+            setStorageGroupStatement.getStorageGroupPath(), setStorageGroupStatement.getTtl());

Review Comment:
   ```suggestion
               setStorageGroupStatement.getStorageGroupPath(), setStorageGroupStatement.getTTL());
   ```



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