1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

MCOL-5806: added ability to start node in read-only mode

* feat(cmapi): add read_only param for API add node endpoint
* style(cmapi): fixes for string length and quotes

Add dbroots of other nodes to the read-only node

On every node change adjust dbroots in the read-only nodes

Fix logging (trace level) in tests
This commit is contained in:
Alexander Presnyakov
2025-03-12 13:21:37 +00:00
committed by Serguey Zefirov
parent a27f1a1f98
commit c59e2aa9ee
18 changed files with 508 additions and 101 deletions

View File

@ -76,7 +76,10 @@ def setup_logging(verbose: bool = False) -> None:
add_logging_level('TRACE', 5)
dict_config(MCS_CLI_LOG_CONF_PATH)
if verbose:
enable_console_logging(logging.getLogger())
for logger_name in ("", "mcs_cli"):
logger = logging.getLogger(logger_name)
logger.setLevel(logging.DEBUG)
enable_console_logging(logger)
if __name__ == '__main__':

View File

@ -198,6 +198,14 @@ def add(
'node IP, name or FQDN. '
'Can be used multiple times to add several nodes at a time.'
)
),
read_only: bool = typer.Option(
False,
'--read-only',
help=(
'Add node (or nodes, if more than one is passed) in read-only '
'mode.'
)
)
):
"""Add nodes to the Columnstore cluster."""
@ -207,7 +215,9 @@ def add(
extra_nodes=nodes
):
for node in nodes:
result.append(client.add_node({'node': node}))
result.append(
client.add_node({'node': node, 'read_only': read_only})
)
return result