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

[GitHub] [doris] weizuo93 opened a new pull request, #20597: [Log](query) Add log of fragment instance num to recognize large query

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

   ## Proposed changes
   
   Large queries usually cause cluster instability, but it can be difficult to locate specific SQL. In general, large queries have a very large number of fragment instances.
   ![2023-06-08 17-00-35 的屏幕截图](https://github.com/apache/doris/assets/68884553/87cb6222-2e8a-4bc7-a2ee-5a2099fce078)
   
    This patch adds log to print fragment instance number for a query to recognize large queries.


-- 
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] weizuo93 commented on pull request #20597: [Log](query) Add log of fragment instance num to recognize large query

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

   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] weizuo93 commented on pull request #20597: [Log](query) Add log of fragment instance num to recognize large query

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

   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] github-actions[bot] commented on pull request #20597: [Log](query) Add log of fragment instance num to recognize large query

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

   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] weizuo93 commented on a diff in pull request #20597: [Log](query) Add log of fragment instance num to recognize large query

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


##########
fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java:
##########
@@ -1371,6 +1371,18 @@ private void sendResult(boolean isOutfileQuery, boolean isSendFields, Queriable
         }
         profile.getSummaryProfile().setQueryScheduleFinishTime();
         updateProfile(false);
+        if (coord.getInstanceTotalNum() > 1) {
+            try {
+                LOG.debug("Start to execute fragment. user: {}, db: {}, sql: {}, fragment instance num: {}",

Review Comment:
   > add if Log.isdebugenabled() because the sql maybe very long in some cases it may cost a lot of memory or cpu time.
   
   Done.



##########
fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java:
##########
@@ -1449,6 +1461,16 @@ private void sendResult(boolean isOutfileQuery, boolean isSendFields, Queriable
             throw e;
         } finally {
             fetchResultSpan.end();
+            if (coord.getInstanceTotalNum() > 1) {
+                try {
+                    LOG.debug("Finish to execute fragment. user: {}, db: {}, sql: {}, fragment instance num: {}",

Review Comment:
   > and here.
   
   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: 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 #20597: [Log](query) Add log of fragment instance num to recognize large query

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

   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] weizuo93 commented on pull request #20597: [Log](query) Add log of fragment instance num to recognize large query

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

   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] yiguolei commented on a diff in pull request #20597: [Log](query) Add log of fragment instance num to recognize large query

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


##########
fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java:
##########
@@ -1371,6 +1371,18 @@ private void sendResult(boolean isOutfileQuery, boolean isSendFields, Queriable
         }
         profile.getSummaryProfile().setQueryScheduleFinishTime();
         updateProfile(false);
+        if (coord.getInstanceTotalNum() > 1) {
+            try {
+                LOG.debug("Start to execute fragment. user: {}, db: {}, sql: {}, fragment instance num: {}",

Review Comment:
   add  if  Log.isdebugenabled() because the sql maybe very long 
   in some cases it may cost a lot of memory or cpu time.



##########
fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java:
##########
@@ -1449,6 +1461,16 @@ private void sendResult(boolean isOutfileQuery, boolean isSendFields, Queriable
             throw e;
         } finally {
             fetchResultSpan.end();
+            if (coord.getInstanceTotalNum() > 1) {
+                try {
+                    LOG.debug("Finish to execute fragment. user: {}, db: {}, sql: {}, fragment instance num: {}",

Review Comment:
   and here.



-- 
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] weizuo93 merged pull request #20597: [Log](query) Add log of fragment instance num to recognize large query

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


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