You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@linkis.apache.org by pe...@apache.org on 2022/09/16 02:56:11 UTC

[incubator-linkis] branch dev-1.3.1 updated: Fix reuse of MarkReq in orchestrator. (#3430)

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

peacewong pushed a commit to branch dev-1.3.1
in repository https://gitbox.apache.org/repos/asf/incubator-linkis.git


The following commit(s) were added to refs/heads/dev-1.3.1 by this push:
     new 9d142030f Fix reuse of MarkReq in orchestrator. (#3430)
9d142030f is described below

commit 9d142030f19b5660be95b3f2dd8107f796ec40ff
Author: Alexyang <xu...@qq.com>
AuthorDate: Fri Sep 16 10:56:04 2022 +0800

    Fix reuse of MarkReq in orchestrator. (#3430)
    
    * linkis-orchestrator-ecm-plugin - fix properties reusing bug method applyMark.
---
 .../linkis/orchestrator/ecm/entity/MarkReq.scala     | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/linkis-orchestrator/plugin/linkis-orchestrator-ecm-plugin/src/main/scala/org/apache/linkis/orchestrator/ecm/entity/MarkReq.scala b/linkis-orchestrator/plugin/linkis-orchestrator-ecm-plugin/src/main/scala/org/apache/linkis/orchestrator/ecm/entity/MarkReq.scala
index 4c7ef08a2..3fc0b4f9f 100644
--- a/linkis-orchestrator/plugin/linkis-orchestrator-ecm-plugin/src/main/scala/org/apache/linkis/orchestrator/ecm/entity/MarkReq.scala
+++ b/linkis-orchestrator/plugin/linkis-orchestrator-ecm-plugin/src/main/scala/org/apache/linkis/orchestrator/ecm/entity/MarkReq.scala
@@ -101,6 +101,21 @@ class DefaultMarkReq extends MarkReq with Logging {
         return flag
       }
       if (other.getLabels != null && getLabels != null) {
+        if (null != labelKeySet) {
+          labelKeySet.foreach(key => {
+            var found = false
+            getLabels
+              .keySet()
+              .foreach(k => {
+                if (key.equals(k)) {
+                  found = true
+                }
+              })
+            if (!found) {
+              return flag
+            }
+          })
+        }
         val iterator = other.getLabels.iterator
         while (iterator.hasNext) {
           val next = iterator.next()
@@ -121,8 +136,11 @@ class DefaultMarkReq extends MarkReq with Logging {
             }
           }
         }
+      } else if (null == getLabels && null == other.getLabels) {
+        flag = true
+      } else {
+        flag = false
       }
-      flag = true
     }
     flag
   }


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