NealSun96 commented on a change in pull request #973:
URL: https://github.com/apache/helix/pull/973#discussion_r420246943
##########
File path:
helix-core/src/main/java/org/apache/helix/task/TaskStateModelFactory.java
##########
@@ -102,4 +107,36 @@ public boolean isShutdown() {
public boolean isTerminated() {
return _taskExecutor.isTerminated();
}
+
+ /*
+ * Get target thread pool size from InstanceConfig first; if that fails, get
it from
+ * ClusterConfig; if that fails, fall back to the default value.
+ */
+ private static int getTaskThreadPoolSize(HelixManager manager) {
+ ConfigAccessor configAccessor = manager.getConfigAccessor();
+ // Check instance config first for thread pool size
+ InstanceConfig instanceConfig =
+ configAccessor.getInstanceConfig(manager.getClusterName(),
manager.getInstanceName());
+ if (instanceConfig != null) {
Review comment:
Additionally, we are also updating `LiveInstance`, which I'm giving the
same treatment. Read: if `InstanceConfig`, `ClusterConfig`, `LiveInstance`
don't exist, the `TaskStateModelFactory` will **not** handle the exception and
will let the process fail, because they should exist. I believe if they don't
exist, somewhere else will also fail on participant side.
I'm open to your suggestions, what do you think? @jiajunwang @narendly
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]