aloyszhang commented on code in PR #10435:
URL: https://github.com/apache/inlong/pull/10435#discussion_r1642502444
##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/heartbeat/HeartbeatManager.java:
##########
@@ -274,11 +281,13 @@ private void evictClusterNode(HeartbeatMsg heartbeat) {
return;
}
- for (int i = 0; i < ports.length; i++) {
+ for (int i = 0; i < ips.length; i++) {
// deep clone the heartbeat
HeartbeatMsg heartbeatMsg =
JsonUtils.parseObject(JsonUtils.toJsonByte(heartbeat), HeartbeatMsg.class);
assert heartbeatMsg != null;
- heartbeatMsg.setPort(ports[i].trim());
+ if (StringUtils.isNotBlank(heartbeat.getPort())) {
+ heartbeatMsg.setPort(ports[i].trim());
Review Comment:
`ports` may be null even if `heartbeat.getPort()` is not blank.
--
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]