Damans227 commented on code in PR #13552:
URL: https://github.com/apache/cloudstack/pull/13552#discussion_r3531639466


##########
engine/orchestration/src/main/java/com/cloud/agent/manager/AgentManagerImpl.java:
##########
@@ -423,7 +427,7 @@ public void onManagementServerCancelMaintenance() {
     }
 
     private void initConnectExecutor() {
-        _connectExecutor = new ThreadPoolExecutor(100, 500, 60L, 
TimeUnit.SECONDS, new LinkedBlockingQueue<>(), new 
NamedThreadFactory("AgentConnectTaskPool"));
+        _connectExecutor = new 
ThreadPoolExecutor(AgentConnectExecutorCorePoolSize.value(), 
AgentConnectExecutorMaxPoolSize.value(), 60L, TimeUnit.SECONDS, new 
LinkedBlockingQueue<>(), new NamedThreadFactory("AgentConnectTaskPool"));

Review Comment:
   Why no validation here? If max ends up lower than core, this throws and 
crashes management server startup. Maybe clamp the values before use so a bad 
config doesn't break things.



-- 
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]

Reply via email to