Skip to content

Commit

Permalink
[INLONG-11157][Manager] Fix comment
Browse files Browse the repository at this point in the history
  • Loading branch information
fuweng11 committed Sep 20, 2024
1 parent 646438a commit f044e4a
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ public class InlongClusterServiceImpl implements InlongClusterService {
10L,
TimeUnit.SECONDS,
new ArrayBlockingQueue<>(100),
new ThreadFactoryBuilder().setNameFormat("async-install-%s").build(),
new ThreadFactoryBuilder().setNameFormat("agent-install-%s").build(),
new CallerRunsPolicy());
private final LinkedBlockingQueue<ClusterNodeRequest> installQueue = new LinkedBlockingQueue<>();
private final LinkedBlockingQueue<ClusterNodeRequest> pendingInstallRequests = new LinkedBlockingQueue<>();

@Autowired
private InlongGroupEntityMapper groupMapper;
Expand Down Expand Up @@ -717,7 +717,7 @@ public Integer saveNode(ClusterNodeRequest request, String operator) {
Integer id = instance.saveOpt(request, operator);
if (request.getIsInstall()) {
request.setId(id);
installQueue.add(request);
pendingInstallRequests.add(request);
}
return id;
}
Expand Down Expand Up @@ -867,7 +867,7 @@ public Boolean updateNode(ClusterNodeRequest request, String operator) {
if (request.getIsInstall()) {
// when reinstall set install to false
request.setIsInstall(false);
installQueue.add(request);
pendingInstallRequests.add(request);
}
return true;
}
Expand Down Expand Up @@ -1422,10 +1422,10 @@ public void run() {

@Transactional(rollbackFor = Throwable.class)
public void processInstall() {
if (installQueue.isEmpty()) {
if (pendingInstallRequests.isEmpty()) {
return;
}
ClusterNodeRequest request = installQueue.poll();
ClusterNodeRequest request = pendingInstallRequests.poll();
InlongClusterNodeInstallOperator clusterNodeInstallOperator = clusterNodeInstallOperatorFactory.getInstance(
request.getType());
if (request.getIsInstall()) {
Expand Down

0 comments on commit f044e4a

Please sign in to comment.