woofyzhao commented on code in PR #5758:
URL: https://github.com/apache/inlong/pull/5758#discussion_r960177628


##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/sink/StreamSinkServiceImpl.java:
##########
@@ -224,23 +231,27 @@ public Boolean update(SinkRequest request, String 
operator) {
             }
         }
         List<SinkField> fields = request.getSinkFieldList();
-        // Remove id in sinkField when save
+        // Remove id in sinkField before saving or updating
         if (CollectionUtils.isNotEmpty(fields)) {
             fields.forEach(sinkField -> sinkField.setId(null));
         }
 
+        SinkStatus nextStatus = null;
+        boolean streamSuccess = 
StreamStatus.CONFIG_SUCCESSFUL.getCode().equals(streamEntity.getStatus());
+        if (streamSuccess || 
StreamStatus.CONFIG_FAILED.getCode().equals(streamEntity.getStatus())) {
+            nextStatus = SinkStatus.CONFIG_ING;
+        }
         StreamSinkOperator sinkOperator = 
operatorFactory.getInstance(request.getSinkType());
-        sinkOperator.updateOpt(request, operator);
+        sinkOperator.updateOpt(request, nextStatus, operator);
 
-        // The inlong group status is [Configuration successful], then 
asynchronously initiate
-        // the [Single inlong stream resource creation] workflow
-        if 
(GroupStatus.CONFIG_SUCCESSFUL.getCode().equals(groupEntity.getStatus())) {
+        // If the stream is [CONFIG_SUCCESSFUL], then asynchronously start the 
[CREATE_STREAM_RESOURCE] process

Review Comment:
   In the comment it still says asynchronously



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to