virajjasani commented on code in PR #2252:
URL: https://github.com/apache/phoenix/pull/2252#discussion_r2270832200
##########
phoenix-core-server/src/main/java/org/apache/phoenix/coprocessor/PhoenixRegionServerEndpoint.java:
##########
@@ -133,4 +151,24 @@ public ServerMetadataCache getServerMetadataCache() {
return ServerMetadataCacheImpl.getInstance(conf);
}
+ public static TaskRunner
getUncoveredIndexThreadPool(RegionCoprocessorEnvironment env) {
+ if (uncoveredIndexThreadPool == null) {
+ synchronized (PhoenixRegionServerEndpoint.class) {
Review Comment:
Why do we need to start the pool lazily? Why not start it upfront in init()
specifically when we can set lower core pool size than max pool size. Core pool
size can be 10 and max pool size 512 (default). Also, setting idle thread
timeout will help terminate threads if they stay idle (i.e. no one uses
uncovered index)
--
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]