1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

Added --coordinator-only option to "mcs cluster node add"

This commit is contained in:
Alexander Presnyakov
2025-07-18 02:38:52 +00:00
parent 4c54defd37
commit a193104ee1
2 changed files with 11 additions and 2 deletions

View File

@ -206,6 +206,14 @@ def add(
'Add node (or nodes, if more than one is passed) in read-only '
'mode.'
)
),
coordinator_only: bool = typer.Option(
False,
'--coordinator-only',
help=(
'Add node(s) as coordinator-only (read-only, but does not add other nodes\' dbroots).'
),
hidden=True,
)
):
"""Add nodes to the Columnstore cluster."""
@ -214,9 +222,10 @@ def add(
timeout=timedelta(days=1).total_seconds(), handle_signals=True,
extra_nodes=nodes
):
add_other_nodes_dbroots = not coordinator_only
for node in nodes:
result.append(
client.add_node({'node': node, 'read_only': read_only})
client.add_node({'node': node, 'read_only': read_only, 'add_other_nodes_dbroots': add_other_nodes_dbroots})
)
return result