sashapolo commented on code in PR #1800:
URL: https://github.com/apache/ignite-3/pull/1800#discussion_r1144814275
##########
modules/index/src/main/java/org/apache/ignite/internal/index/IndexManager.java:
##########
@@ -91,33 +112,58 @@ public class IndexManager extends Producer<IndexEvent,
IndexEventParameters> imp
/** Prevents double stopping of the component. */
private final AtomicBoolean stopGuard = new AtomicBoolean();
+ /** Cluster service. */
+ private final ClusterService clusterService;
+
+ /** Index building executor. */
+ private final ExecutorService buildIndexExecutor;
+
/**
* Constructor.
*
- * @param tablesCfg Tables and indexes configuration.
+ * @param nodeName Node name.
+ * @param tablesConfig Tables and indexes configuration.
* @param schemaManager Schema manager.
* @param tableManager Table manager.
+ * @param clusterService Cluster service.
*/
- public IndexManager(TablesConfiguration tablesCfg, SchemaManager
schemaManager, TableManager tableManager) {
- this.tablesCfg = Objects.requireNonNull(tablesCfg, "tablesCfg");
+ public IndexManager(
+ String nodeName,
+ TablesConfiguration tablesConfig,
+ SchemaManager schemaManager,
+ TableManager tableManager,
+ ClusterService clusterService
+ ) {
+ this.tablesConfig = Objects.requireNonNull(tablesConfig, "tablesCfg");
this.schemaManager = Objects.requireNonNull(schemaManager,
"schemaManager");
this.tableManager = tableManager;
+ this.clusterService = clusterService;
+
+ int cpus = Runtime.getRuntime().availableProcessors();
+
+ buildIndexExecutor = new ThreadPoolExecutor(
Review Comment:
Sorry, I mistyped. I meant why not `Executors.newCachedThreadPool`?
--
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]