From a1e87ff26b1190d2e31b69dc5b07afca5689338b Mon Sep 17 00:00:00 2001 From: Tglman Date: Thu, 15 Feb 2024 13:12:28 +0100 Subject: [PATCH] fix: removed computation of number of clusters based on number of CPU, issue #10117 --- .../orient/core/config/OGlobalConfiguration.java | 2 +- .../storage/config/OClusterBasedStorageConfiguration.java | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/com/orientechnologies/orient/core/config/OGlobalConfiguration.java b/core/src/main/java/com/orientechnologies/orient/core/config/OGlobalConfiguration.java index 88d0676f515..0ec077da670 100755 --- a/core/src/main/java/com/orientechnologies/orient/core/config/OGlobalConfiguration.java +++ b/core/src/main/java/com/orientechnologies/orient/core/config/OGlobalConfiguration.java @@ -1220,7 +1220,7 @@ public void change(final Object iCurrentValue, final Object iNewValue) { "class.minimumClusters", "Minimum clusters to create when a new class is created. 0 means Automatic", Integer.class, - 0), + 8), // LOG LOG_SUPPORTS_ANSI( diff --git a/core/src/main/java/com/orientechnologies/orient/core/storage/config/OClusterBasedStorageConfiguration.java b/core/src/main/java/com/orientechnologies/orient/core/storage/config/OClusterBasedStorageConfiguration.java index 46a203e2acf..5f7240b2db9 100755 --- a/core/src/main/java/com/orientechnologies/orient/core/storage/config/OClusterBasedStorageConfiguration.java +++ b/core/src/main/java/com/orientechnologies/orient/core/storage/config/OClusterBasedStorageConfiguration.java @@ -1963,9 +1963,7 @@ private void copy( private void autoInitClusters() { if (getContextConfiguration().getValueAsInteger(OGlobalConfiguration.CLASS_MINIMUM_CLUSTERS) == 0) { - final int cpus = Runtime.getRuntime().availableProcessors(); - getContextConfiguration() - .setValue(OGlobalConfiguration.CLASS_MINIMUM_CLUSTERS, Math.min(cpus, 64)); + getContextConfiguration().setValue(OGlobalConfiguration.CLASS_MINIMUM_CLUSTERS, 8); } }