aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgvit <gvit@ydb.tech>2023-10-12 11:53:34 +0300
committergvit <gvit@ydb.tech>2023-10-12 12:39:39 +0300
commit80508570636c9339ea697ef7f5738543398953df (patch)
treef052660e0aa2a32c5a13ffe2f67750afac45728e
parentdc3f01d5126d446177c38dbed4ad0fd1575d49a6 (diff)
downloadydb-80508570636c9339ea697ef7f5738543398953df.tar.gz
enable in memory pdisks by default
-rw-r--r--ydb/tests/functional/api/test_discovery.py2
-rw-r--r--ydb/tests/functional/cms/test_cms_restart.py1
-rw-r--r--ydb/tests/functional/cms/test_cms_state_storage.py1
-rw-r--r--ydb/tests/functional/hive/test_drain.py1
-rw-r--r--ydb/tests/functional/restarts/test_restarts.py2
-rw-r--r--ydb/tests/library/harness/kikimr_config.py14
6 files changed, 17 insertions, 4 deletions
diff --git a/ydb/tests/functional/api/test_discovery.py b/ydb/tests/functional/api/test_discovery.py
index a59434fb6f..fc5839c8b2 100644
--- a/ydb/tests/functional/api/test_discovery.py
+++ b/ydb/tests/functional/api/test_discovery.py
@@ -121,7 +121,7 @@ class TestDiscoveryFaultInjectionSlotStop(AbstractTestDiscoveryFaultInjection):
class TestMirror3DCDiscovery(object):
@classmethod
def setup_class(cls):
- cls.cluster = kikimr_cluster_factory(KikimrConfigGenerator(erasure=types.Erasure.MIRROR_3_DC))
+ cls.cluster = kikimr_cluster_factory(KikimrConfigGenerator(erasure=types.Erasure.MIRROR_3_DC, use_in_memory_pdisks=False))
cls.cluster.start()
@classmethod
diff --git a/ydb/tests/functional/cms/test_cms_restart.py b/ydb/tests/functional/cms/test_cms_restart.py
index 30db244eae..d5e743e8c1 100644
--- a/ydb/tests/functional/cms/test_cms_restart.py
+++ b/ydb/tests/functional/cms/test_cms_restart.py
@@ -30,6 +30,7 @@ class AbstractLocalClusterTest(object):
nodes_count *= 2
configurator = KikimrConfigGenerator(cls.erasure,
nodes=nodes_count,
+ use_in_memory_pdisks=False,
additional_log_configs={'CMS': LogLevels.DEBUG},
)
cls.cluster = kikimr_cluster_factory(configurator=configurator)
diff --git a/ydb/tests/functional/cms/test_cms_state_storage.py b/ydb/tests/functional/cms/test_cms_state_storage.py
index 75c2b922b8..75feaa9475 100644
--- a/ydb/tests/functional/cms/test_cms_state_storage.py
+++ b/ydb/tests/functional/cms/test_cms_state_storage.py
@@ -24,6 +24,7 @@ class AbstractLocalClusterTest(object):
def setup_class(cls):
configurator = KikimrConfigGenerator(Erasure.NONE,
nodes=27,
+ use_in_memory_pdisks=False,
additional_log_configs={'CMS': LogLevels.DEBUG},
state_storage_rings=[[n, n + 1, n + 2] for n in range(1, 27, 3)]
)
diff --git a/ydb/tests/functional/hive/test_drain.py b/ydb/tests/functional/hive/test_drain.py
index 305aea9f59..613172d784 100644
--- a/ydb/tests/functional/hive/test_drain.py
+++ b/ydb/tests/functional/hive/test_drain.py
@@ -25,6 +25,7 @@ class TestHive(object):
additional_log_configs={
'HIVE': LogLevels.TRACE, 'LOCAL': LogLevels.TRACE
},
+ use_in_memory_pdisks=False,
hive_config={
'max_node_usage_to_kick': 100,
'min_scatter_to_balance': 100,
diff --git a/ydb/tests/functional/restarts/test_restarts.py b/ydb/tests/functional/restarts/test_restarts.py
index 79d4c2dea5..09492b58e9 100644
--- a/ydb/tests/functional/restarts/test_restarts.py
+++ b/ydb/tests/functional/restarts/test_restarts.py
@@ -20,7 +20,7 @@ class AbstractLocalClusterTest(object):
@classmethod
def setup_class(cls):
- configurator = KikimrConfigGenerator(cls.erasure)
+ configurator = KikimrConfigGenerator(cls.erasure, use_in_memory_pdisks=False)
cls.cluster = kikimr_cluster_factory(configurator=configurator)
cls.cluster.start()
diff --git a/ydb/tests/library/harness/kikimr_config.py b/ydb/tests/library/harness/kikimr_config.py
index 85e9f2ecb7..e5204302d5 100644
--- a/ydb/tests/library/harness/kikimr_config.py
+++ b/ydb/tests/library/harness/kikimr_config.py
@@ -94,6 +94,16 @@ def _load_yaml_config(filename):
return yaml.safe_load(_read_file(filename))
+def use_in_memory_pdisks_var(pdisk_store_path, use_in_memory_pdisks):
+ if os.getenv('YDB_USE_IN_MEMORY_PDISKS') is not None:
+ return os.getenv('YDB_USE_IN_MEMORY_PDISKS') == "true"
+
+ if pdisk_store_path:
+ return False
+
+ return use_in_memory_pdisks
+
+
class KikimrConfigGenerator(object):
def __init__(
self,
@@ -123,7 +133,7 @@ class KikimrConfigGenerator(object):
n_to_select=None,
use_log_files=True,
grpc_ssl_enable=False,
- use_in_memory_pdisks=False,
+ use_in_memory_pdisks=True,
enable_pqcd=True,
enable_metering=False,
enable_audit_log=False,
@@ -194,7 +204,7 @@ class KikimrConfigGenerator(object):
self.state_storage_rings = state_storage_rings
if self.state_storage_rings is None:
self.state_storage_rings = copy.deepcopy(self.__node_ids[: 9 if erasure == Erasure.MIRROR_3_DC else 8])
- self.__use_in_memory_pdisks = use_in_memory_pdisks or os.getenv('YDB_USE_IN_MEMORY_PDISKS') == 'true'
+ self.__use_in_memory_pdisks = use_in_memory_pdisks_var(pdisk_store_path, use_in_memory_pdisks)
self.__pdisks_directory = os.getenv('YDB_PDISKS_DIRECTORY')
self.static_erasure = erasure
self.domain_name = domain_name