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: incomplete vectorized traces #59555

Closed
glennfawcett opened this issue Jan 28, 2021 · 3 comments · Fixed by #61380
Closed

sql: incomplete vectorized traces #59555

glennfawcett opened this issue Jan 28, 2021 · 3 comments · Fixed by #61380
Assignees
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.

Comments

@glennfawcett
Copy link

Describe the problem

I ran across an interesting observation while trying to explain how queries are run in parallel within CRDB. I was using the internal KV workload and have a fair number of ranges distributed across three nodes:

root@:26257/kv> SELECT k2, count(*) FROM kv GROUP BY k2;
    k2   |  count
---------+----------
  z      | 4561620
  needle |       8
  

I was expecting that the above query would run in parallel, but when looking at the Jaeger trace collected, it appears to not be serial.

Screen Shot 2021-01-19 at 11 18 57 AM

[stmt-bundle-625911811735650305.zip](https://github.com/cockroachdb/cockroach/files/5889843/stmt-bundle-625911811735650305.zip) [stmt-bundle-628463749489590273.zip](https://github.com/cockroachdb/cockroach/files/5889847/stmt-bundle-628463749489590273.zip)

At the advise of engineering, I ran this by disabling vectorization SET vectorize = off and it appeared to run as expected albeit longer.

@glennfawcett glennfawcett added the C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. label Jan 28, 2021
@glennfawcett glennfawcett added this to Triage in BACKLOG, NO NEW ISSUES: SQL Execution via automation Jan 28, 2021
@glennfawcett glennfawcett added this to Triage in Cluster Observability via automation Jan 28, 2021
@glennfawcett glennfawcett added this to Triage in BACKLOG, NO NEW ISSUES: SQL Optimizer via automation Jan 28, 2021
@RaduBerinde
Copy link
Member

To clarify - the query runs in parallel on the three nodes, but the traces for the actual flow and scans are missing from node 2 and 3. It looks like a problem with tracing when using the vectorized engine. I tried to repro locally in a simpler case and could not - I saw traces for scans from all nodes.

@RaduBerinde RaduBerinde changed the title vectorized query doesn't appear to run concurrently across nodes sql: incomplete vectorized traces Jan 28, 2021
@asubiotto asubiotto moved this from Triage to 21.1 Stability Issues in BACKLOG, NO NEW ISSUES: SQL Execution Feb 1, 2021
@yuzefovich
Copy link
Member

Yeah, it is a known issue (#55821) that we intend to address for 21.1 release.

@asubiotto asubiotto moved this from 21.1 Stability Issues to 21.1 F in BACKLOG, NO NEW ISSUES: SQL Execution Mar 2, 2021
@yuzefovich
Copy link
Member

An update here is that #61380 will fix it and will be in 21.1:
Screen Shot 2021-03-03 at 7 11 27 PM

@craig craig bot closed this as completed in d7748a9 Mar 4, 2021
@yuzefovich yuzefovich moved this from 21.1 F to 21.1 F Reactive in BACKLOG, NO NEW ISSUES: SQL Execution Mar 4, 2021
@yuzefovich yuzefovich removed this from Triage in Cluster Observability Mar 4, 2021
@yuzefovich yuzefovich moved this from 21.1 F Reactive to 21.1 F Done in BACKLOG, NO NEW ISSUES: SQL Execution Mar 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants