private Boolean updateAgentHeartbeatOpt(HeartbeatReportRequest request) {
        // If heartbeatMsg not contain any group ,just delete
        if (CollectionUtils.isEmpty(request.getGroupHeartbeats()) && StringUtils.isNotBlank(request.getIp())) {
            String agentIp = request.getIp();
            sourceMapper.logicalDeleteByAgentIp(agentIp, SourceStatus.SOURCE_DISABLE.getCode(),
                    SourceStatus.SOURCE_NORMAL.getCode());
        }
        return updateHeartbeatOpt(request);
    }
Update heartbeatMsg for agent , if groupMsg is empty, then logically remove all stream source related.
If type of stream_source is file, change status from heartbeat_timeout

@param request
@return
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/heartbeat/HeartbeatServiceImpl.java