gavinchou commented on code in PR #46959:
URL: https://github.com/apache/doris/pull/46959#discussion_r1915375106
##########
fe/fe-core/src/main/java/org/apache/doris/catalog/TabletStatMgr.java:
##########
@@ -43,12 +43,24 @@
public class TabletStatMgr extends MasterDaemon {
private static final Logger LOG =
LogManager.getLogger(TabletStatMgr.class);
- private ForkJoinPool taskPool = new
ForkJoinPool(Runtime.getRuntime().availableProcessors());
+ private ForkJoinPool taskPool = new ForkJoinPool(Math.max(8,
Runtime.getRuntime().availableProcessors()));
public TabletStatMgr() {
super("tablet stat mgr", Config.tablet_stat_update_interval_second *
1000);
}
+ private ForkJoinPool adjustThreadPool(int backendSize) {
+ int minimunParallelism = Math.max(8,
Runtime.getRuntime().availableProcessors());
Review Comment:
is it better?
```suggestion
int minimunParallelism = taskPool.getParallelism();
```
and we should set taskPool if it is null at the beginning of this method and
no need to do null check any further. (also consider initialing taskPool here)
--
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]