healchow commented on code in PR #7621:
URL: https://github.com/apache/inlong/pull/7621#discussion_r1138238889
##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/node/AbstractDataNodeOperator.java:
##########
@@ -95,7 +110,41 @@ public Boolean testConnection(DataNodeRequest request) {
}
@Override
- public void updateRelatedStreamSource(DataNodeRequest request) {
+ public void updateRelatedStreamSource(DataNodeRequest request,
DataNodeEntity entity, String operator) {
LOGGER.info("do nothing for the data node type ={}",
request.getType());
}
+
+ public void retryStreamSourceByDataNodeNameAndType(String dataNodeName,
String type, String operator) {
+ Integer status = SourceStatus.TO_BE_ISSUED_RETRY.getCode();
+ LOGGER.info("begin to update stream source status by dataNodeName={},
status={}, by operator={}",
+ dataNodeName, status, operator);
+ List<StreamSourceEntity> streamSourceEntities =
sourceMapper.selectByClusterAndDataNode(null,
+ dataNodeName, type);
+ List<Integer> needUpdateIds = new ArrayList<>();
+ for (StreamSourceEntity source : streamSourceEntities) {
Review Comment:
The efficiency of this for loop is very low, can the filter be completed in
the above query?
--
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]