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

[GitHub] [doris] wangbo opened a new pull request, #21174: [improvement](workloadgroup)add check when drop/set workload group

wangbo opened a new pull request, #21174:
URL: https://github.com/apache/doris/pull/21174

   ## Proposed changes
   
   1 check group exists when set group for user property;
   eg, if g1 not exists, then set op should be failed.
   ```
   mysql [test]>SET PROPERTY FOR 'root' 'default_workload_group' = 'g1';
   ERROR 1105 (HY000): errCode = 2, detailMessage = workload group g1 not exists
   ```
   
   2 check whether group is used for user when drop group;
   eg, if a group is set for root, then drop should be failed.
   ```
   mysql [test]>drop workload group test_g1;
   ERROR 1105 (HY000): errCode = 2, detailMessage = workload group test_g1 is set for user root
   ```
   


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


[GitHub] [doris] github-actions[bot] commented on pull request #21174: [improvement](workloadgroup)add check when drop/set workload group

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #21174:
URL: https://github.com/apache/doris/pull/21174#issuecomment-1608794528

   PR approved by at least one committer and no changes requested.


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


[GitHub] [doris] github-actions[bot] commented on pull request #21174: [improvement](workloadgroup)add check when drop/set workload group

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #21174:
URL: https://github.com/apache/doris/pull/21174#issuecomment-1606990321

   PR approved by anyone and no changes requested.


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


[GitHub] [doris] yiguolei merged pull request #21174: [improvement](workloadgroup)add check when drop/set workload group

Posted by "yiguolei (via GitHub)" <gi...@apache.org>.
yiguolei merged PR #21174:
URL: https://github.com/apache/doris/pull/21174


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


[GitHub] [doris] github-actions[bot] commented on pull request #21174: [improvement](workloadgroup)add check when drop/set workload group

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #21174:
URL: https://github.com/apache/doris/pull/21174#issuecomment-1607295758

   PR approved by at least one committer and no changes requested.


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


[GitHub] [doris] wangbo commented on pull request #21174: [improvement](workloadgroup)add check when drop/set workload group

Posted by "wangbo (via GitHub)" <gi...@apache.org>.
wangbo commented on PR #21174:
URL: https://github.com/apache/doris/pull/21174#issuecomment-1607256713

   run buildall


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


[GitHub] [doris] wangbo commented on pull request #21174: [improvement](workloadgroup)add check when drop/set workload group

Posted by "wangbo (via GitHub)" <gi...@apache.org>.
wangbo commented on PR #21174:
URL: https://github.com/apache/doris/pull/21174#issuecomment-1608689398

   run buildall


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


[GitHub] [doris] luozenglin commented on a diff in pull request #21174: [improvement](workloadgroup)add check when drop/set workload group

Posted by "luozenglin (via GitHub)" <gi...@apache.org>.
luozenglin commented on code in PR #21174:
URL: https://github.com/apache/doris/pull/21174#discussion_r1243073422


##########
fe/fe-core/src/main/java/org/apache/doris/mysql/privilege/UserProperty.java:
##########
@@ -305,6 +305,10 @@ public void update(List<Pair<String, String>> properties) throws UserException {
                 if (keyArr.length != 1) {
                     throw new DdlException(PROP_WORKLOAD_GROUP + " format error");
                 }
+                boolean ret = Env.getCurrentEnv().getWorkloadGroupMgr().isWorkloadGroupExists(value);

Review Comment:
   might add a authentication, like `Env.getCurrentEnv().getAccessManager()
   .checkWorkloadGroupPriv(ConnectContext.get(), value, PrivPredicate.USAGE)`



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


[GitHub] [doris] github-actions[bot] commented on pull request #21174: [improvement](workloadgroup)add check when drop/set workload group

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #21174:
URL: https://github.com/apache/doris/pull/21174#issuecomment-1606990268

   PR approved by at least one committer and no changes requested.


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


[GitHub] [doris] yiguolei commented on pull request #21174: [improvement](workloadgroup)add check when drop/set workload group

Posted by "yiguolei (via GitHub)" <gi...@apache.org>.
yiguolei commented on PR #21174:
URL: https://github.com/apache/doris/pull/21174#issuecomment-1606989366

   run buildall


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


[GitHub] [doris] wangbo commented on pull request #21174: [improvement](workloadgroup)add check when drop/set workload group

Posted by "wangbo (via GitHub)" <gi...@apache.org>.
wangbo commented on PR #21174:
URL: https://github.com/apache/doris/pull/21174#issuecomment-1607289096

   run buildall


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