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/inlong.git


The following commit(s) were added to refs/heads/master by this push:
     new 98f94c5c3 [INLONG-6621][Manager] Fixed the problem of source tasks are 
issued repeatedly (#6623)
98f94c5c3 is described below

commit 98f94c5c3b6b55cf957d9d1d123af6be47410954
Author: fuweng11 <[email protected]>
AuthorDate: Thu Nov 24 20:27:33 2022 +0800

    [INLONG-6621][Manager] Fixed the problem of source tasks are issued 
repeatedly (#6623)
---
 .../src/main/resources/mappers/StreamSourceEntityMapper.xml           | 1 +
 .../apache/inlong/manager/service/source/AbstractSourceOperator.java  | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git 
a/inlong-manager/manager-dao/src/main/resources/mappers/StreamSourceEntityMapper.xml
 
b/inlong-manager/manager-dao/src/main/resources/mappers/StreamSourceEntityMapper.xml
index 05fa7fbe7..e19a05edc 100644
--- 
a/inlong-manager/manager-dao/src/main/resources/mappers/StreamSourceEntityMapper.xml
+++ 
b/inlong-manager/manager-dao/src/main/resources/mappers/StreamSourceEntityMapper.xml
@@ -380,6 +380,7 @@
         status = #{nextStatus, jdbcType=INTEGER}
         <where>
             is_deleted = 0
+            and status != 101
             and inlong_group_id = #{groupId, jdbcType=VARCHAR}
             <if test="streamId != null">
                 and inlong_stream_id = #{streamId, jdbcType=VARCHAR}
diff --git 
a/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/source/AbstractSourceOperator.java
 
b/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/source/AbstractSourceOperator.java
index a3e68b8b5..a27ae75de 100644
--- 
a/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/source/AbstractSourceOperator.java
+++ 
b/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/source/AbstractSourceOperator.java
@@ -169,11 +169,11 @@ public abstract class AbstractSourceOperator implements 
StreamSourceOperator {
         // re-issue task if necessary
         if (InlongConstants.STANDARD_MODE.equals(groupMode)) {
             if 
(GroupStatus.forCode(groupStatus).equals(GroupStatus.CONFIG_SUCCESSFUL)) {
-                entity.setStatus(SourceStatus.TO_BE_ISSUED_ADD.getCode());
+                entity.setStatus(SourceStatus.TO_BE_ISSUED_RETRY.getCode());
             } else {
                 switch (SourceStatus.forCode(entity.getStatus())) {
                     case SOURCE_NORMAL:
-                        
entity.setStatus(SourceStatus.TO_BE_ISSUED_ADD.getCode());
+                        
entity.setStatus(SourceStatus.TO_BE_ISSUED_RETRY.getCode());
                         break;
                     case SOURCE_FAILED:
                         entity.setStatus(SourceStatus.SOURCE_NEW.getCode());

Reply via email to