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

feat: support query manager #347

Merged
merged 9 commits into from
Jul 17, 2023
Merged

feat: support query manager #347

merged 9 commits into from
Jul 17, 2023

Conversation

wtsclwq
Copy link
Contributor

@wtsclwq wtsclwq commented Jul 13, 2023

What problem does this PR solve?

Issue Number: close #291 , close #292, close #293

Discussion Number #285

What is changed and how it works?

In previous versions, each sql node assigned a query id from 0, which is not unique under a distributed cluster. In this pull request, all sql nodes can assign a globally unique id to each query statement they receive and support the SHOW QUERIES statement under the distributed cluster to display the detailed letter of the all running SQL. Then we can use the KILL QUERY statement to abort the running statement on the store nodes.

How Has This Been Tested?

Simulate some slow queries, and then use SHOW QUERIES and KILL QUERY statements on them.

image

  • Test A
  • Test B
  • Test cases to be added
  • No code

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Signed-off-by: wtsclwq <lwqcode@foxmail.com>
Signed-off-by: wtsclwq <lwqcode@foxmail.com>
@codecov
Copy link

codecov bot commented Jul 13, 2023

Codecov Report

Merging #347 (04fd727) into main (9d23b26) will increase coverage by 0.06%.
The diff coverage is 71.76%.

@@            Coverage Diff             @@
##             main     #347      +/-   ##
==========================================
+ Coverage   72.30%   72.37%   +0.06%     
==========================================
  Files         443      444       +1     
  Lines       92743    93089     +346     
==========================================
+ Hits        67062    67377     +315     
- Misses      21435    21450      +15     
- Partials     4246     4262      +16     

lib/metaclient/meta_callback.go Outdated Show resolved Hide resolved
Signed-off-by: wtsclwq <lwqcode@foxmail.com>
Signed-off-by: wtsclwq <lwqcode@foxmail.com>
Signed-off-by: wtsclwq <lwqcode@foxmail.com>
Signed-off-by: wtsclwq <lwqcode@foxmail.com>
app/ts-store/transport/handler/handlers_process.go Outdated Show resolved Hide resolved
app/ts-store/transport/handler/handlers_process.go Outdated Show resolved Hide resolved
app/ts-store/transport/handler/handlers_process.go Outdated Show resolved Hide resolved
lib/errno/code.go Outdated Show resolved Hide resolved
open_src/influx/meta/errors.go Outdated Show resolved Hide resolved
open_src/influx/query/executor.go Outdated Show resolved Hide resolved
Signed-off-by: wtsclwq <lwqcode@foxmail.com>
lib/errno/message.go Outdated Show resolved Hide resolved
open_src/influx/meta/errors.go Outdated Show resolved Hide resolved
Signed-off-by: wtsclwq <lwqcode@foxmail.com>
Signed-off-by: wtsclwq <lwqcode@foxmail.com>
@shilinlee shilinlee requested a review from scuzyj July 17, 2023 08:38
@shilinlee shilinlee merged commit 55879a2 into openGemini:main Jul 17, 2023
10 of 11 checks passed
wenli7363 pushed a commit to wenli7363/openGemini that referenced this pull request Aug 4, 2023
Signed-off-by: wtsclwq <lwqcode@foxmail.com>
Signed-off-by: wenli7363 <cjy0415@qq.com>
wenli7363 pushed a commit to wenli7363/openGemini that referenced this pull request Aug 4, 2023
Signed-off-by: wtsclwq <lwqcode@foxmail.com>
@wtsclwq wtsclwq deleted the merge_qm branch January 15, 2024 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants