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

casion pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/linkis.git

commit aafd9942fae740f52971382938f7ff54ba47a633
Author: peacewong <[email protected]>
AuthorDate: Tue Jun 27 22:16:22 2023 +0800

    A single executor engine type should not create multiple executors #4713
---
 .../org/apache/linkis/engineconn/core/executor/ExecutorManager.scala | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git 
a/linkis-computation-governance/linkis-engineconn/linkis-engineconn-core/src/main/scala/org/apache/linkis/engineconn/core/executor/ExecutorManager.scala
 
b/linkis-computation-governance/linkis-engineconn/linkis-engineconn-core/src/main/scala/org/apache/linkis/engineconn/core/executor/ExecutorManager.scala
index f758b129e..e6dabe73e 100644
--- 
a/linkis-computation-governance/linkis-engineconn/linkis-engineconn-core/src/main/scala/org/apache/linkis/engineconn/core/executor/ExecutorManager.scala
+++ 
b/linkis-computation-governance/linkis-engineconn/linkis-engineconn-core/src/main/scala/org/apache/linkis/engineconn/core/executor/ExecutorManager.scala
@@ -171,7 +171,10 @@ class LabelExecutorManagerImpl extends 
LabelExecutorManager with Logging {
         MessageFormat.format(CANNOT_GET_LABEL_KEY.getErrorDesc, 
GSON.toJson(labels))
       )
     }
-
+    if (!executors.isEmpty && factories.size <= 1) {
+      logger.info("For a single Executor EC, if an Executor exists, it will be 
returned directly")
+      return getReportExecutor.asInstanceOf[LabelExecutor]
+    }
     if (!executors.containsKey(labelKey)) executors synchronized {
       if (!executors.containsKey(labelKey)) {
         val executor = tryCreateExecutor(engineCreationContext, labels)


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to