akshayrai commented on a change in pull request #4405: [TE] add a thread pool to run preview tasks URL: https://github.com/apache/incubator-pinot/pull/4405#discussion_r301309518
########## File path: thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/yaml/YamlResource.java ########## @@ -145,6 +154,7 @@ public YamlResource() { this.evaluationDAO = DAORegistry.getInstance().getEvaluationManager(); this.sessionDAO = DAORegistry.getInstance().getSessionDAO(); this.yaml = new Yaml(); + this.executor = Executors.newFixedThreadPool(PREVIEW_PARALLELISM); Review comment: How about a using a `newCachedThreadPool`? That way the calls won't easily timeout at peak traffic. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org