You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by do...@apache.org on 2021/07/10 05:39:27 UTC

[incubator-inlong] branch master updated: [INLONG-703] Query after adding a consumer group policy and report a null error

This is an automated email from the ASF dual-hosted git repository.

dockerzhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-inlong.git


The following commit(s) were added to refs/heads/master by this push:
     new 29a7927  [INLONG-703] Query after adding a consumer group policy and report a null error
29a7927 is described below

commit 29a79273bbffd64163b2850bfa040a0ceb61e60c
Author: gosonzhang <46...@qq.com>
AuthorDate: Sat Jul 10 12:29:28 2021 +0800

    [INLONG-703] Query after adding a consumer group policy and report a null error
---
 .../master/web/handler/WebAdminFlowRuleHandler.java       | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/master/web/handler/WebAdminFlowRuleHandler.java b/inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/master/web/handler/WebAdminFlowRuleHandler.java
index 326462c..6a6ac6e 100644
--- a/inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/master/web/handler/WebAdminFlowRuleHandler.java
+++ b/inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/master/web/handler/WebAdminFlowRuleHandler.java
@@ -385,10 +385,14 @@ public class WebAdminFlowRuleHandler extends AbstractWebHandler {
                     continue;
                 }
                 found = false;
-                for (String tmpGroupName : batchGroupNames) {
-                    if (entity.getGroupName().equals(tmpGroupName)) {
-                        found = true;
-                        break;
+                if (batchGroupNames.isEmpty()) {
+                    found = true;
+                } else {
+                    for (String tmpGroupName : batchGroupNames) {
+                        if (entity.getGroupName().equals(tmpGroupName)) {
+                            found = true;
+                            break;
+                        }
                     }
                 }
                 if (found) {
@@ -492,6 +496,9 @@ public class WebAdminFlowRuleHandler extends AbstractWebHandler {
             return result.success;
         }
         int qryPriorityId = (int) result.retData1;
+        if (qryPriorityId == defValue) {
+            return result.success;
+        }
         if (qryPriorityId > 303 || qryPriorityId < 101) {
             result.setFailResult(new StringBuilder(512)
                     .append("Illegal value in ").append(WebFieldDef.QRYPRIORITYID.name)