krishan1390 commented on code in PR #17424:
URL: https://github.com/apache/pinot/pull/17424#discussion_r2645014022
##########
pinot-server/src/main/java/org/apache/pinot/server/starter/helix/SegmentOnlineOfflineStateModelFactory.java:
##########
@@ -247,4 +250,12 @@ public void onBecomeDroppedFromError(Message message,
NotificationContext contex
}
}
}
+
+ @Override
+ public ExecutorService getExecutorService(String resourceName, String
fromState, String toState) {
Review Comment:
ideally lets add a seperate flag to create a threadpool per resource
(table). that way we achieve more isolation
##########
pinot-server/src/main/java/org/apache/pinot/server/starter/helix/SegmentOnlineOfflineStateModelFactory.java:
##########
@@ -247,4 +250,12 @@ public void onBecomeDroppedFromError(Message message,
NotificationContext contex
}
}
}
+
+ @Override
+ public ExecutorService getExecutorService(String resourceName, String
fromState, String toState) {
Review Comment:
we shouldn't change default behaviour . so by default we should return null
here so that it goes through existing code flow.
##########
pinot-server/src/main/java/org/apache/pinot/server/starter/helix/BaseServerStarter.java:
##########
@@ -701,6 +702,9 @@ public void start()
segmentDownloadThrottler,
segmentMultiColTextIndexPreprocessThrottler);
}
+ _serverThreadPoolManager = new ServerThreadPoolManager(_serverConf);
+
_clusterConfigChangeHandler.registerClusterConfigChangeListener(_serverThreadPoolManager);
Review Comment:
conf change listener won't help because the getExecutorService method is
called just once as per helix docs. so we can remove that to simplify and avoid
anyone assuming a restart isn't required
##########
pinot-server/src/main/java/org/apache/pinot/server/starter/helix/SegmentOnlineOfflineStateModelFactory.java:
##########
@@ -247,4 +250,12 @@ public void onBecomeDroppedFromError(Message message,
NotificationContext contex
}
}
}
+
+ @Override
+ public ExecutorService getExecutorService(String resourceName, String
fromState, String toState) {
Review Comment:
The helix docs of StateModelFactory states "This method is called just once
per transition type per resource. "
What is a transition type ? Will this be an issue for us ?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]