You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by GitBox <gi...@apache.org> on 2022/07/05 09:32:52 UTC

[GitHub] [inlong] woofyzhao opened a new pull request, #4878: [INLONG-4875][Manager] Re-issue failed source task

woofyzhao opened a new pull request, #4878:
URL: https://github.com/apache/inlong/pull/4878

   Re-issue failed source task when configuration is fixed.
   
   - Fixes #4875
   


-- 
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@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] dockerzhang merged pull request #4878: [INLONG-4875][Manager] Re-issue failed source task

Posted by GitBox <gi...@apache.org>.
dockerzhang merged PR #4878:
URL: https://github.com/apache/inlong/pull/4878


-- 
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@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] gong commented on a diff in pull request #4878: [INLONG-4875][Manager] Re-issue failed source task

Posted by GitBox <gi...@apache.org>.
gong commented on code in PR #4878:
URL: https://github.com/apache/inlong/pull/4878#discussion_r914378926


##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/source/AbstractSourceOperator.java:
##########
@@ -162,10 +162,11 @@ public void updateOpt(SourceRequest request, Integer groupStatus, String operato
         entity.setModifyTime(new Date());
 
         // Re-issue task if necessary
+        entity.setPreviousStatus(entity.getStatus());
         if (GroupStatus.forCode(groupStatus).equals(GroupStatus.CONFIG_SUCCESSFUL)) {
-            LOGGER.info("re-issuing source task {}, previous status = {}", entity.getId(), entity.getStatus());
-            entity.setPreviousStatus(entity.getStatus());
             entity.setStatus(SourceStatus.TO_BE_ISSUED_ADD.getCode());
+        } else {
+            entity.setStatus(SourceStatus.SOURCE_NEW.getCode());

Review Comment:
   Not `CONFIG_SUCCESSFUL`, code will set `SourceStatus.SOURCE_NEW`.   Do we need  set `SourceStatus.SOURCE_NEW` by judging status?



-- 
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@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] woofyzhao commented on a diff in pull request #4878: [INLONG-4875][Manager] Re-issue failed source task

Posted by GitBox <gi...@apache.org>.
woofyzhao commented on code in PR #4878:
URL: https://github.com/apache/inlong/pull/4878#discussion_r914635172


##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/source/AbstractSourceOperator.java:
##########
@@ -162,10 +162,11 @@ public void updateOpt(SourceRequest request, Integer groupStatus, String operato
         entity.setModifyTime(new Date());
 
         // Re-issue task if necessary
+        entity.setPreviousStatus(entity.getStatus());
         if (GroupStatus.forCode(groupStatus).equals(GroupStatus.CONFIG_SUCCESSFUL)) {
-            LOGGER.info("re-issuing source task {}, previous status = {}", entity.getId(), entity.getStatus());
-            entity.setPreviousStatus(entity.getStatus());
             entity.setStatus(SourceStatus.TO_BE_ISSUED_ADD.getCode());
+        } else {
+            entity.setStatus(SourceStatus.SOURCE_NEW.getCode());

Review Comment:
   Limit the original source status range to be either success or fail. Other status leave unchanged.



-- 
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@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] healchow commented on a diff in pull request #4878: [INLONG-4875][Manager] Re-issue failed source task

Posted by GitBox <gi...@apache.org>.
healchow commented on code in PR #4878:
URL: https://github.com/apache/inlong/pull/4878#discussion_r914557471


##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/source/AbstractSourceOperator.java:
##########
@@ -162,10 +162,11 @@ public void updateOpt(SourceRequest request, Integer groupStatus, String operato
         entity.setModifyTime(new Date());
 
         // Re-issue task if necessary
+        entity.setPreviousStatus(entity.getStatus());
         if (GroupStatus.forCode(groupStatus).equals(GroupStatus.CONFIG_SUCCESSFUL)) {
-            LOGGER.info("re-issuing source task {}, previous status = {}", entity.getId(), entity.getStatus());
-            entity.setPreviousStatus(entity.getStatus());
             entity.setStatus(SourceStatus.TO_BE_ISSUED_ADD.getCode());
+        } else {
+            entity.setStatus(SourceStatus.SOURCE_NEW.getCode());

Review Comment:
   Do you have any ideas?



##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/source/AbstractSourceOperator.java:
##########
@@ -162,10 +162,11 @@ public void updateOpt(SourceRequest request, Integer groupStatus, String operato
         entity.setModifyTime(new Date());
 
         // Re-issue task if necessary
+        entity.setPreviousStatus(entity.getStatus());
         if (GroupStatus.forCode(groupStatus).equals(GroupStatus.CONFIG_SUCCESSFUL)) {
-            LOGGER.info("re-issuing source task {}, previous status = {}", entity.getId(), entity.getStatus());
-            entity.setPreviousStatus(entity.getStatus());
             entity.setStatus(SourceStatus.TO_BE_ISSUED_ADD.getCode());
+        } else {
+            entity.setStatus(SourceStatus.SOURCE_NEW.getCode());

Review Comment:
   @gong Do you have any ideas?



-- 
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@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] woofyzhao commented on a diff in pull request #4878: [INLONG-4875][Manager] Re-issue failed source task

Posted by GitBox <gi...@apache.org>.
woofyzhao commented on code in PR #4878:
URL: https://github.com/apache/inlong/pull/4878#discussion_r914358638


##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/source/AbstractSourceOperator.java:
##########
@@ -160,6 +160,14 @@ public void updateOpt(SourceRequest request, Integer groupStatus, String operato
         entity.setVersion(entity.getVersion() + 1);
         entity.setModifier(operator);
         entity.setModifyTime(new Date());
+
+        // Re-issue task if necessary
+        if (GroupStatus.forCode(groupStatus).equals(GroupStatus.CONFIG_SUCCESSFUL)) {

Review Comment:
   Then we need to reset status to NEW. Fixed.



-- 
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@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] healchow commented on a diff in pull request #4878: [INLONG-4875][Manager] Re-issue failed source task

Posted by GitBox <gi...@apache.org>.
healchow commented on code in PR #4878:
URL: https://github.com/apache/inlong/pull/4878#discussion_r914348390


##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/source/AbstractSourceOperator.java:
##########
@@ -160,6 +160,14 @@ public void updateOpt(SourceRequest request, Integer groupStatus, String operato
         entity.setVersion(entity.getVersion() + 1);
         entity.setModifier(operator);
         entity.setModifyTime(new Date());
+
+        // Re-issue task if necessary
+        if (GroupStatus.forCode(groupStatus).equals(GroupStatus.CONFIG_SUCCESSFUL)) {

Review Comment:
   What if the GroupStatus is failed?



-- 
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@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org