You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-01 06:46:55 +03:00
fix(cmapi): MCOL-5638 Improve Client Error Messaging and async broadcasting config.
* fix(cmapi): broadcast_new_config function using aiohttp and improved errors handling mechanics * fix(cmapi): requirements updating aiohttp version and it's dependencies * fix(cmapi, deps): unused imports * fix(cmapi, tests): test_broadcast_new_config
This commit is contained in:
committed by
Alan Mologorsky
parent
89c892ab2f
commit
55b09a71fc
@ -47,17 +47,7 @@ def toggle_cluster_state(
|
||||
|
||||
switch_node_maintenance(maintainance_flag)
|
||||
update_revision_and_manager()
|
||||
|
||||
# TODO: move this from multiple places to one
|
||||
try:
|
||||
broadcast_successful = broadcast_new_config(config)
|
||||
except Exception as err:
|
||||
raise CMAPIBasicError(
|
||||
'Error while distributing config file.'
|
||||
) from err
|
||||
|
||||
if not broadcast_successful:
|
||||
raise CMAPIBasicError('Config distribution isn\'t successful.')
|
||||
broadcast_new_config(config)
|
||||
|
||||
|
||||
class ClusterHandler():
|
||||
@ -189,16 +179,7 @@ class ClusterHandler():
|
||||
input_config_filename=config, output_config_filename=config
|
||||
)
|
||||
|
||||
try:
|
||||
broadcast_successful = broadcast_new_config(config)
|
||||
except Exception as err:
|
||||
raise CMAPIBasicError(
|
||||
'Error while distributing config file.'
|
||||
) from err
|
||||
|
||||
if not broadcast_successful:
|
||||
raise CMAPIBasicError('Config distribution isn\'t successful.')
|
||||
|
||||
broadcast_new_config(config)
|
||||
logger.debug(f'Successfully finished adding node {node}.')
|
||||
return response
|
||||
|
||||
@ -242,17 +223,7 @@ class ClusterHandler():
|
||||
update_revision_and_manager(
|
||||
input_config_filename=config, output_config_filename=config
|
||||
)
|
||||
try:
|
||||
broadcast_successful = broadcast_new_config(
|
||||
config, nodes=active_nodes
|
||||
)
|
||||
except Exception as err:
|
||||
raise CMAPIBasicError(
|
||||
'Error while distributing config file.'
|
||||
) from err
|
||||
if not broadcast_successful:
|
||||
raise CMAPIBasicError('Config distribution isn\'t successful.')
|
||||
|
||||
broadcast_new_config(config, nodes=active_nodes)
|
||||
logger.debug(f'Successfully finished removing node {node}.')
|
||||
return response
|
||||
|
||||
|
Reference in New Issue
Block a user