File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ public class IoTDBConfig {
112112 private int mqttPort = 1883 ;
113113
114114 /** The handler pool size for handing the mqtt messages. */
115- private int mqttHandlerPoolSize = 1 ;
115+ private int mqttHandlerPoolSize = Math . max ( 1 , Runtime . getRuntime (). availableProcessors () >> 1 ) ;
116116
117117 /** The mqtt message payload formatter. */
118118 private String mqttPayloadFormatter = "json" ;
Original file line number Diff line number Diff line change @@ -528,7 +528,7 @@ public void loadProperties(TrimProperties properties) throws BadNodeUrlException
528528 "degree_of_query_parallelism" , Integer .toString (conf .getDegreeOfParallelism ()))));
529529
530530 if (conf .getDegreeOfParallelism () <= 0 ) {
531- conf .setDegreeOfParallelism (Runtime .getRuntime ().availableProcessors () / 2 );
531+ conf .setDegreeOfParallelism (Math . max ( 1 , Runtime .getRuntime ().availableProcessors () / 2 ) );
532532 }
533533
534534 conf .setMergeThresholdOfExplainAnalyze (
@@ -2541,7 +2541,7 @@ private void loadCQProps(TrimProperties properties) {
25412541 "continuous_query_thread_num" ,
25422542 Integer .toString (conf .getContinuousQueryThreadNum ()))));
25432543 if (conf .getContinuousQueryThreadNum () <= 0 ) {
2544- conf .setContinuousQueryThreadNum (Runtime .getRuntime ().availableProcessors () / 2 );
2544+ conf .setContinuousQueryThreadNum (Math . max ( 1 , Runtime .getRuntime ().availableProcessors () / 2 ) );
25452545 }
25462546
25472547 conf .setContinuousQueryMinimumEveryInterval (
You can’t perform that action at this time.
0 commit comments