Skip to content
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

sql: allow monitoring and controlling long running queries #7003

Closed
a6802739 opened this issue Jun 2, 2016 · 10 comments
Closed

sql: allow monitoring and controlling long running queries #7003

a6802739 opened this issue Jun 2, 2016 · 10 comments
Assignees
Labels
C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) O-community Originated from the community
Milestone

Comments

@a6802739
Copy link
Contributor

a6802739 commented Jun 2, 2016

Original question: will cocoroachdb have plans to support 'watching thread running state' like show processlist in mysql.

Users should be able to observe progress of long-running operations like online schema changes or large queries; and potentially interrupt operations asynchronously.

@knz knz added the C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) label Jun 4, 2016
@knz knz changed the title See the thread running in cockroachdb like 'show processlist' in mysql sql: allow monitoring and controlling server threads Jun 4, 2016
@knz
Copy link
Contributor

knz commented Jun 4, 2016

@a6802739 yes this is on the roadmap.

@knz
Copy link
Contributor

knz commented Jun 4, 2016

@petermattis is there a way to link particular issues like this one to our roadmap, so we can update them when we get there?

@petermattis
Copy link
Collaborator

@knz Sure, edit the wiki and add a link to the issue. Someone recently did this for common table expressions.

@petermattis
Copy link
Collaborator

Tracking progress of schema changes and backup / restore operations is targeted for 1.0. We'll likely have a different mechanism for tracking long running queries.

@spencerkimball spencerkimball changed the title sql: allow monitoring and controlling server threads sql: allow monitoring and controlling long running queries Apr 1, 2017
@spencerkimball
Copy link
Member

Retitling this to target long running queries. See #7554 for the system jobs table.

@spencerkimball spencerkimball modified the milestones: Later, 1.0 Apr 1, 2017
@a6802739
Copy link
Contributor Author

@knz , @petermattis any suggestions to start with for this feature, we need this in our production urgently.

@petermattis
Copy link
Collaborator

@a6802739 We need to sketch out a design first. In addition to being able to display running queries, we need to be able to cancel them too. Presumably we'd want to be able to show all of the SQL sessions (i.e. connections) and what queries are running on them.

@knz
Copy link
Contributor

knz commented Apr 13, 2017

FWIW #10317 provides a mechanism to inspect currently open sessions on a node. I could complete the PR using the design direction suggested by Andrei (and Ben) in there. The missing piece would be cancellation, but perhaps context cancellation would help us here.

@petermattis
Copy link
Collaborator

For SHOW PROCESSLIST (or whatever we call it) we'd want to be able to show the sessions across the entire cluster. Some sort of fan out query to retrieve the sessions per node.

@itsbilal
Copy link
Member

Both SHOW QUERIES and CANCEL QUERY is in master. See PRs: #16072 #17003 #17527

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) O-community Originated from the community
Projects
None yet
Development

No branches or pull requests

7 participants