You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "luozenglin (via GitHub)" <gi...@apache.org> on 2023/06/25 11:26:36 UTC

[GitHub] [doris] luozenglin commented on a diff in pull request #21149: [bugfix](workloadgroup) could not upgrade from 2.0 alpha

luozenglin commented on code in PR #21149:
URL: https://github.com/apache/doris/pull/21149#discussion_r1241143276


##########
fe/fe-core/src/main/java/org/apache/doris/resource/workloadgroup/WorkloadGroup.java:
##########
@@ -281,8 +281,13 @@ public static WorkloadGroup read(DataInput in) throws IOException {
 
     @Override
     public void gsonPostProcess() throws IOException {
-        String memoryLimitString = properties.get(MEMORY_LIMIT);
-        this.memoryLimitPercent = Double.parseDouble(memoryLimitString.substring(0, memoryLimitString.length() - 1));
+        if (properties.containsKey(MEMORY_LIMIT)) {
+            String memoryLimitString = properties.get(MEMORY_LIMIT);
+            this.memoryLimitPercent = Double.parseDouble(memoryLimitString.substring(0,
+                    memoryLimitString.length() - 1));
+        } else {
+            this.memoryLimitPercent = 100;

Review Comment:
   properties.put(MEMORY_LIMIT, "100");
   this.memoryLimitPercent = 100;



-- 
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: commits-unsubscribe@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org