-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DNM] MCOL-5133: Stage3 stand alone cli tool. #3397
base: develop
Are you sure you want to change the base?
[DNM] MCOL-5133: Stage3 stand alone cli tool. #3397
Conversation
[add] cluster api client class [fix] cli cluster_app using cluster api client [add] ClusterAction Enum [add] toggle_cluster_state function to reduce code duplication
[fix] client class methods [fix] Transaction management at endpoint handling level [fix] add_node and set_mode methods to use TransactionManager
MAJOR: Some logic inside node remove changed significantly using active nodes list from Columnstore.xml to broadcast config after remove. [fix] remove node logic to use Transaction manager [fix] cluster set api key call using totp on a top level cli call [add] missed docstrings
raise CMAPIBasicError('Error while removing node.') from err | ||
|
||
response['node_id'] = node | ||
if len(txn_nodes) > 0: | ||
active_nodes = get_active_nodes(config) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you elaborate on the reasons for this change @mariadb-AlanMologorsky ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Now TransactionManager class used and this value is out of inner function scope.
- While I investigate how to make it visible I made a valuable conclusion that all the time it was wrong logic:
Checking number of nodes which had successful start of transaction after removing one of them is invalid by default. At least there are corner case with removing last one node. I used active nodes from updated MCS configuration instead.
) | ||
response.raise_for_status() | ||
return response.json() | ||
# TODO: different handler for timeout exception? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea.
Could you point me where do we release the lock if something went south during execution of a command on a cluster ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Api client itself just calling remote endpoint, thansaction mechanics never used here. Otherwise it's used on a top level. For eg. here
MAJOR: Some logic inside node remove changed significantly using active
nodes list from Columnstore.xml to broadcast config after remove.