You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by "gong (via GitHub)" <gi...@apache.org> on 2023/03/27 07:46:50 UTC

[GitHub] [inlong] gong commented on a diff in pull request #7707: [INLONG-7706][Manager] Fix sink is always in the configuration after being saved

gong commented on code in PR #7707:
URL: https://github.com/apache/inlong/pull/7707#discussion_r1148914959


##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/sink/StreamSinkServiceImpl.java:
##########
@@ -440,16 +447,17 @@ public Boolean update(SinkRequest request, UserInfo opInfo) {
         }
         // update record
         SinkStatus nextStatus = null;
-        boolean streamSuccess = StreamStatus.CONFIG_SUCCESSFUL.getCode().equals(streamEntity.getStatus());
-        if (streamSuccess || StreamStatus.CONFIG_FAILED.getCode().equals(streamEntity.getStatus())) {
+        boolean enableConfig = StreamStatus.CONFIG_SUCCESSFUL.getCode().equals(streamEntity.getStatus())
+                || StreamStatus.CONFIG_FAILED.getCode().equals(streamEntity.getStatus());
+        if (enableConfig || StreamStatus.CONFIG_FAILED.getCode().equals(streamEntity.getStatus())) {

Review Comment:
   Maybe `enableConfig || StreamStatus.CONFIG_FAILED.getCode().equals(streamEntity.getStatus())` change to 
   `enableConfig`



-- 
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