diff options
author | Aleksandr Petrikhin <shmeleine@gmail.com> | 2022-06-01 09:10:22 +0300 |
---|---|---|
committer | Aleksandr Petrikhin <shmeleine@gmail.com> | 2022-06-01 09:10:22 +0300 |
commit | f7ff52e403e2cc2c6bc5fa73df2052426bbdc93f (patch) | |
tree | 731acf71f7756dfa9054344bc0697cb31422109e | |
parent | 4ee953e82965c006d3eb1ceef4e0451178c58064 (diff) | |
download | ydb-f7ff52e403e2cc2c6bc5fa73df2052426bbdc93f.tar.gz |
[KIKIMR-14221] enable PQ by default
ref:1cdd481683d8425049c89d91c93ca2e35c410301
-rw-r--r-- | ydb/public/tools/lib/cmds/__init__.py | 12 | ||||
-rw-r--r-- | ydb/tests/library/harness/kikimr_config.py | 16 | ||||
-rw-r--r-- | ydb/tests/library/harness/resources/default_yaml.yml | 8 |
3 files changed, 20 insertions, 16 deletions
diff --git a/ydb/public/tools/lib/cmds/__init__.py b/ydb/public/tools/lib/cmds/__init__.py index e51681796b..ee6ddda842 100644 --- a/ydb/public/tools/lib/cmds/__init__.py +++ b/ydb/public/tools/lib/cmds/__init__.py @@ -234,14 +234,6 @@ def grpc_tls_data_path(arguments): return os.getenv('YDB_GRPC_TLS_DATA_PATH', default_store) -def enable_datastreams(arguments): - return getattr(arguments, 'enable_datastreams', False) or os.getenv('YDB_ENABLE_DATASTREAMS') == 'true' - - -def enable_pq(arguments): - return getattr(arguments, 'enable_pq', False) or enable_datastreams(arguments) - - def pq_client_service_types(arguments): items = getattr(arguments, 'pq_client_service_types', None) if not items: @@ -258,7 +250,7 @@ def pq_client_service_types(arguments): def enable_pqcd(arguments): - return enable_pq(arguments) and (getattr(arguments, 'enable_pqcd', False) or os.getenv('YDB_ENABLE_PQCD') == 'true') + return (getattr(arguments, 'enable_pqcd', False) or os.getenv('YDB_ENABLE_PQCD') == 'true') def deploy(arguments): @@ -296,9 +288,7 @@ def deploy(arguments): output_path=recipe.generate_data_path(), pdisk_store_path=pdisk_store_path, domain_name='local', - enable_pq=enable_pq(arguments), pq_client_service_types=pq_client_service_types(arguments), - enable_datastreams=enable_datastreams(arguments), enable_pqcd=enable_pqcd(arguments), load_udfs=True, suppress_version_check=arguments.suppress_version_check, diff --git a/ydb/tests/library/harness/kikimr_config.py b/ydb/tests/library/harness/kikimr_config.py index e2d0615f75..12ff9e154f 100644 --- a/ydb/tests/library/harness/kikimr_config.py +++ b/ydb/tests/library/harness/kikimr_config.py @@ -74,6 +74,10 @@ def load_default_yaml(default_tablet_node_ids, ydb_domain_name, static_erasure, ydb_state_storage_n_to_select=n_to_select, ydb_state_storage_nodes=state_storage_nodes, ydb_grpc_host=get_grpc_host(), + ydb_pq_topics_are_first_class_citizen=bool(os.getenv("YDB_PQ_TOPICS_ARE_FIRST_CLASS_CITIZEN", "true")), + ydb_pq_cluster_table_path=str(os.getenv("YDB_PQ_CLUSTER_TABLE_PATH", "")), + ydb_pq_version_table_path=str(os.getenv("YDB_PQ_VERSION_TABLE_PATH", "")), + ydb_pq_root=str(os.getenv("YDB_PQ_ROOT", "")), ) yaml_dict = yaml.safe_load(data) yaml_dict["log_config"]["entry"] = [] @@ -131,6 +135,7 @@ class KikimrConfigGenerator(object): node_kind=None, bs_cache_file_path=None, yq_tenant=None, + use_legacy_pq=False, ): self._version = version self.use_log_files = use_log_files @@ -200,13 +205,22 @@ class KikimrConfigGenerator(object): self.yaml_config["feature_flags"]["enable_public_api_external_blobs"] = enable_public_api_external_blobs self.yaml_config["feature_flags"]["enable_mvcc"] = "VALUE_FALSE" if disable_mvcc else "VALUE_TRUE" self.yaml_config['pqconfig']['enabled'] = enable_pq + # NOTE(shmel1k@): KIKIMR-14221 + if use_legacy_pq: + self.yaml_config['pqconfig']['topics_are_first_class_citizen'] = False + self.yaml_config['pqconfig']['cluster_table_path'] = '/Root/PQ/Config/V2/Cluster' + self.yaml_config['pqconfig']['version_table_path'] ='/Root/PQ/Config/V2/Versions' + self.yaml_config['pqconfig']['check_acl'] = False + self.yaml_config['pqconfig']['require_credentials_in_new_protocol'] = False + self.yaml_config['pqconfig']['root'] = '/Root/PQ' + self.yaml_config['pqconfig']['quoting_config']['enable_quoting'] = False + if pq_client_service_types: self.yaml_config['pqconfig']['client_service_type'] = [] for service_type in pq_client_service_types: self.yaml_config['pqconfig']['client_service_type'].append({'name': service_type}) # NOTE(shmel1k@): change to 'true' after migration to YDS scheme - self.yaml_config['pqconfig']['topics_are_first_class_citizen'] = enable_pq and enable_datastreams self.yaml_config['sqs_config']['enable_sqs'] = enable_sqs self.yaml_config['pqcluster_discovery_config']['enabled'] = enable_pqcd self.yaml_config["net_classifier_config"]["net_data_file_path"] = os.path.join(self.__output_path, diff --git a/ydb/tests/library/harness/resources/default_yaml.yml b/ydb/tests/library/harness/resources/default_yaml.yml index c40713ddbe..aba91b93a5 100644 --- a/ydb/tests/library/harness/resources/default_yaml.yml +++ b/ydb/tests/library/harness/resources/default_yaml.yml @@ -180,12 +180,12 @@ pqconfig: # NOTE(shmel1k@): KIKIMR-14221 enabled: true meta_cache_timeout_sec: 1 - topics_are_first_class_citizen: false + topics_are_first_class_citizen: {ydb_pq_topics_are_first_class_citizen} check_acl: false require_credentials_in_new_protocol: false - cluster_table_path: "/Root/PQ/Config/V2/Cluster" - version_table_path: "/Root/PQ/Config/V2/Versions" - root: "/Root/PQ" + cluster_table_path: "{ydb_pq_cluster_table_path}" + version_table_path: "{ydb_pq_version_table_path}" + root: "{ydb_pq_root}" quoting_config: enable_quoting: false pqcluster_discovery_config: |