[MXS-4251] Stop button is not working properly and high memory usage in the Query Editor Created: 2022-08-22 Updated: 2022-10-03 Resolved: 2022-10-03 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | maxgui |
| Affects Version/s: | 22.08.0 |
| Fix Version/s: | 22.08.2 |
| Type: | Bug | Priority: | Major |
| Reporter: | Naresh Chandra | Assignee: | Duong Thien Ly |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
||||||||||||||||||||
| Sub-Tasks: |
|
||||||||||||||||||||
| Sprint: | MXS-SPRINT-166, MXS-SPRINT-167 |
| Description |
|
Hi Team, We are testing the Query editor for the 22.08.0 beta version , so we found the below issues and even Maxscale query editor is very slow, while switching between the tabs. Initially 1st time stop button is working fine, but after 2nd time onwards we are unable to stop the query and the query execution is still happening even the button is in the stopped state. When we try stop the query, some times we are getting the db disconnection issue or mysql server has gone away error. While switching between the query tabs[ within the same work sheet] or switching between the worksheets GUI is very very slow. NOTE1: Even we don't have short cut for stopping the query like how we have run button. NOTE2: Even the run/stop button icon is not attractive, it should be bold something like that. NOTE3: When we click on the db/schema name, it should select the database and all the objects automatically without using the use database option. |
| Comments |
| Comment by Duong Thien Ly [ 2022-08-23 ] |
|
NOTE1: Yes, that's missing at the moment. |
| Comment by Naresh Chandra [ 2022-08-23 ] |
|
Hi Duong, I am using Mozilla Firefox. |
| Comment by Duong Thien Ly [ 2022-08-23 ] |
|
Okay, there must be memory leak issues. To help me reproduce the issue, do you remember, how many worksheets are created in the query editor? Also how many session tabs? |
| Comment by Naresh Chandra [ 2022-08-23 ] |
|
Duong, Even I tried in the google chrome browser and single work sheet and single query tab also its not working. If we try to stop the the query then we are getting the "Please reconnect" notification or lost connection or disconnection issue or mysql server has gone away error. >> NOTE3: you can double-click on the database name to set it as the active one. |
| Comment by Duong Thien Ly [ 2022-08-23 ] |
|
About the slowness when switching between query tabs, do query tabs have data in the result section or they're just blank query tabs? |
| Comment by Naresh Chandra [ 2022-08-23 ] |
|
Yes but we are selecting only around 1000 rows only, but still its being slow. Can we change instead of browser to locally? Or can we think about to speed up the switching tabs any other way would be good. |
| Comment by Duong Thien Ly [ 2022-08-29 ] |
|
Hi naresh.chandra@copart.com, we'll try to improve the slowness issue somehow. Anyway, do you have steps to reproduce the issue regarding the stop button? |
| Comment by Naresh Chandra [ 2022-08-29 ] |
|
Thanks for the update. Its simple select query ["select * from table1;"] and the limit values is 10000. |
| Comment by Naresh Chandra [ 2022-09-26 ] |
|
Duong, We can send Kill query one time is enough to the destination DB, why because some times KILL command will take longer time, so we don't need to wait until the kill command finishes. So, we can just hit the kill query to backend db and automatically GUI should be available to run the query. I mean the run/stop button should be available after stopping the query. |
| Comment by Duong Thien Ly [ 2022-09-26 ] |
|
naresh.chandra@copart.com It will be only possible if it sends `KILL thread_id` instead of `KILL QUERY thread_id` as it's now, which means the connection will be killed. https://mariadb.com/kb/en/kill/. However, killing the connection is not a trivial task. So if it takes time to kill the query, it's expected for the feature that we provide at the moment. We're going to add a loading indicator for stopping the query. e.g. When the stop button is clicked, it shows the loading indicator icon, so you won't mistakenly click again. |
| Comment by Naresh Chandra [ 2022-09-26 ] |
|
Duong, Yeah I got you but instead of waiting for stopping the query, we already sent the KILL command so no need to wait as the stopping process will take care by DB right so, instead of waiting GUI should be read for next query to run, so that we don't to wait for it like SQL yog, actually SQL yog is doing that only. |
| Comment by Duong Thien Ly [ 2022-09-26 ] |
|
Okay, now I got the idea. The GUI will just abort the query request that is in a pending state after sending the KILL command. |
| Comment by Duong Thien Ly [ 2022-09-26 ] |
|
However, with this approach, the GUI won't know when the query is actually stopped. So the GUI will show "Query canceled" in this case. I think that is expected |
| Comment by Naresh Chandra [ 2022-09-26 ] |
|
I don't think whether the query is stopped/killed, GUI will just send the KILL query that's it, immediately it should show query is stopped and ready for next query to be run mode. Any how, back end KILL command will be handled by DB itself, Once we stop the query, so we don't need to worry about the KILL query whether its executed/stopped/killed. |
| Comment by Duong Thien Ly [ 2022-09-26 ] |
|
naresh.chandra@copart.com Hi Naresh, please create another feature request ticket for that matter. |
| Comment by Naresh Chandra [ 2022-09-26 ] |
|
Sure Duong, |
| Comment by Naresh Chandra [ 2022-09-26 ] |
|
Duong, Created a new request for the connection creation issue. Can you please take it forward for the next release, as its a very user friendly UI request. |