healchow commented on code in PR #7989: URL: https://github.com/apache/inlong/pull/7989#discussion_r1193273678
########## inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/source/AbstractSourceOperator.java: ########## @@ -172,21 +172,30 @@ public void updateOpt(SourceRequest request, Integer groupStatus, Integer groupM // re-issue task if necessary if (InlongConstants.STANDARD_MODE.equals(groupMode)) { + SourceStatus sourceStatus = SourceStatus.forCode(entity.getStatus()); + Integer nextStatus = entity.getStatus(); if (GroupStatus.forCode(groupStatus).equals(GroupStatus.CONFIG_SUCCESSFUL)) { - entity.setStatus(SourceStatus.TO_BE_ISSUED_RETRY.getCode()); + nextStatus = SourceStatus.TO_BE_ISSUED_RETRY.getCode(); } else { switch (SourceStatus.forCode(entity.getStatus())) { case SOURCE_NORMAL: - entity.setStatus(SourceStatus.TO_BE_ISSUED_RETRY.getCode()); + case HEARTBEAT_TIMEOUT: + nextStatus = SourceStatus.TO_BE_ISSUED_RETRY.getCode(); break; case SOURCE_FAILED: - entity.setStatus(SourceStatus.SOURCE_NEW.getCode()); + nextStatus = SourceStatus.SOURCE_NEW.getCode(); break; default: // others leave it be break; } } + entity.setStatus(nextStatus); + // When the source is in a heartbeat timeout state, set nextStatus to preStatus + if (Objects.equals(SourceStatus.HEARTBEAT_TIMEOUT.getCode(), sourceStatus.getCode())) { Review Comment: I think that after the user modifies the configuration, the status should change to "modification pending delivery" instead of keeping the heartbeat timeout. The heartbeat timeout should be determined by other processes that are specifically responsible for processing heartbeats. -- 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-unsubscr...@inlong.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org