Details
-
New Feature
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
-
2023-11, 2023-12, 2024-1
Description
Right now `mcs cluster stop` command has a fixed 5 minute timeout waiting for transaction to finish/rollback, For better UX `mcs cluster stop` must interactively ask a user to initiate force shutdown after a minute of waiting for the cluster to stop. There must be parameters to the command to set the timeout and enable force shutdown w/o confirmation, e.g.
```
mcs cluster shutdown
... after a minute
There were data changing operations running on the cluster that are now rolling back. Do you want to initiate a force shutdown?
!!! Force shutdown might affect the availability of tables used by the mentioned operations !!!
Now the fix in https://github.com/mariadb-corporation/mariadb-columnstore-engine/pull/3150 has been merged into develop. So, I did a fresh testing. Here are some findings (potential bugs),
1. mcs cluster stop -t, --timeout behaves more like a wait instead of timeout.
The following result is on a fresh cluster where there is no active writes going on,
[root@mcs1 /]# ps aux | grep DMLProc; date; mcs cluster stop -i -t 300; date;
{ "timestamp": "2024-04-24 13:59:33.099015" }root 1532 0.1 0.7 456248 114668 ? Sl 13:57 0:00 /usr/bin/DMLProc
root 1827 0.0 0.0 12128 1016 ? S+ 13:59 0:00 grep --color=auto DMLProc
Wed Apr 24 13:59:32 UTC 2024
Wed Apr 24 14:04:37 UTC 2024
2. In interactive mode if I choose no, it continues asking the same again again.
Ideally it should exit after first No.
DMLProc is still running. Do you want to force stop? WARNING: Could cause data loss and/or broken cluster. [y/N] N
DMLProc is still running. Do you want to force stop? WARNING: Could cause data loss and/or broken cluster. [y/N] N
DMLProc is still running. Do you want to force stop? WARNING: Could cause data loss and/or broken cluster. [y/N] N
DMLProc is still running. Do you want to force stop? WARNING: Could cause data loss and/or broken cluster. [y/N] N
DMLProc is still running. Do you want to force stop? WARNING: Could cause data loss and/or broken cluster. [y/N] y { "timestamp": "2024-04-24 13:21:36.284813" }
3. --timeout option should not be accepted in the non-interactive mode (default)