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/05/09 08:52:38 UTC

[GitHub] [incubator-inlong] healchow commented on a diff in pull request #4135: [INLONG-4133][Manager] Not pass the type field when querying sources and sinks

healchow commented on code in PR #4135:
URL: https://github.com/apache/incubator-inlong/pull/4135#discussion_r867781827


##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/sink/StreamSinkServiceImpl.java:
##########
@@ -96,9 +102,19 @@ public Integer save(SinkRequest request, String operator) {
         // Make sure that there is no sink info with the current groupId and streamId
         String streamId = request.getInlongStreamId();
         String sinkType = request.getSinkType();
+        String sinkName = request.getSinkName();
         List<StreamSinkEntity> sinkExist = sinkMapper.selectByIdAndType(groupId, streamId, sinkType);
         Preconditions.checkEmpty(sinkExist, ErrorCodeEnum.SINK_ALREADY_EXISTS.getMessage());
 
+        // Check whether the sink and source have the same name under the same groupId and streamId
+        List<StreamSourceEntity> sourceList = sourceMapper.selectByRelatedId(groupId, streamId, sinkName);

Review Comment:
   Why check the source in stream_sink table?



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