jt2594838 commented on code in PR #14477:
URL: https://github.com/apache/iotdb/pull/14477#discussion_r1889756711


##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java:
##########
@@ -2478,7 +2478,19 @@ public int getDefaultStorageGroupLevel() {
     return defaultStorageGroupLevel;
   }
 
-  void setDefaultStorageGroupLevel(int defaultStorageGroupLevel) {
+  void setDefaultStorageGroupLevel(int defaultStorageGroupLevel, boolean 
startUp) {
+    if (defaultStorageGroupLevel < 1) {
+      if (startUp) {
+        logger.warn(
+            "Illegal defaultStorageGroupLevel: {}, should >= 1, use default 
value 1",
+            defaultStorageGroupLevel);
+        defaultStorageGroupLevel = 1;
+      } else {
+        throw new IllegalArgumentException(

Review Comment:
   First, start-up failures should be avoided as much as possible because users 
tend not to check the logs after start-up failures and directly throw the 
problems to us.
   However, if we simply ignore the illegal value during hot-load, the user may 
think the statement is successful, and the configuration has been changed, 
which is also unexpected.



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

Reply via email to