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
@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
@yuzefovich
Copy link
Member

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

@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

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