stalary commented on code in PR #38837:
URL: https://github.com/apache/doris/pull/38837#discussion_r1713001216


##########
fe/fe-core/src/main/java/org/apache/doris/mysql/privilege/UserProperty.java:
##########
@@ -229,18 +236,13 @@ public void update(List<Pair<String, String>> properties, 
boolean isReplay) thro
             String[] keyArr = key.split("\\" + 
SetUserPropertyVar.DOT_SEPARATOR);
             if (keyArr[0].equalsIgnoreCase(PROP_MAX_USER_CONNECTIONS)) {
                 // set property "max_user_connections" = "1000"
-                if (keyArr.length != 1) {
-                    throw new DdlException(PROP_MAX_USER_CONNECTIONS + " 
format error");
-                }
-
-                try {
-                    newMaxConn = Long.parseLong(value);
-                } catch (NumberFormatException e) {
-                    throw new DdlException(PROP_MAX_USER_CONNECTIONS + " is 
not number");
-                }
-
-                if (newMaxConn <= 0 || newMaxConn > 10000) {
-                    throw new DdlException(PROP_MAX_USER_CONNECTIONS + " is 
not valid, must between 1 and 10000");
+                newMaxConn = getConn(key, value, keyArr);
+            } else if 
(keyArr[0].equalsIgnoreCase(PROP_MAX_USER_IP_CONNECTIONS)) {
+                // set property "max_user_ip_connections" = "1000"
+                newMaxIpConn = getConn(key, value, keyArr);
+                if (newMaxIpConn > newMaxConn) {

Review Comment:
   done



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to