Skip to content

roachtest: fix tpchvec/perf in some cases#53911

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
yuzefovich:tpchvec
Sep 10, 2020
Merged

roachtest: fix tpchvec/perf in some cases#53911
craig[bot] merged 1 commit intocockroachdb:masterfrom
yuzefovich:tpchvec

Conversation

@yuzefovich
Copy link
Copy Markdown
Member

@yuzefovich yuzefovich commented Sep 3, 2020

Previously, whenever a slowness threshold is exceeded, we would run
EXPLAIN ANALYZE (DEBUG) on the query at fault using the same connection
for all cluster setups. This would result in running the query only with
vectorize=on which is not what we want. We will now be opening up new
connections to the database after the cluster settings have been updated
in order to get the correct behavior for each of the setups.

Informs: #53884.

Release note: None

@yuzefovich yuzefovich requested a review from asubiotto September 3, 2020 16:45
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Copy link
Copy Markdown
Contributor

@asubiotto asubiotto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit confused. I'm not sure I understand how this log message helps determining whether EXPLAIN ANALYZE ran on the query. Is it part of cluster setup?

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @asubiotto)

Copy link
Copy Markdown
Member Author

@yuzefovich yuzefovich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before we run EXPLAIN ANALYZE, we perform the necessary cluster setup on all configs, so I want to make sure that the correct queries are executed during that setup. Confusingly, in the logs I did see a message about vectorize being set to off, but still only the vectorized stats were available.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained

@yuzefovich
Copy link
Copy Markdown
Member Author

To provide more context - the sequence is:

  • for every cluster setup
    • perform all queries in the setup
    • run EXPLAIN ANALYZE on the query the desired number of times

So printing the queries into the logs will show exactly what queries have been executed before running EXPLAIN ANALYZE.

Copy link
Copy Markdown
Contributor

@asubiotto asubiotto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you tried inducing a failure locally? Does EXPLAIN ANALYZE get run in this case?

:lgtm: if it does not occur locally

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained

@yuzefovich
Copy link
Copy Markdown
Member Author

Forcing the collection of the bundle manually I still see that we correctly execute the cluster setup for vectorize=off case, yet the stats are collected as if vectorize=on is set. Digging into this.

@yuzefovich yuzefovich changed the title roachtest: add some logging to tpchvec roachtest: fix tpchvec/perf in some cases Sep 10, 2020
Previously, whenever a slowness threshold is exceeded, we would run
EXPLAIN ANALYZE (DEBUG) on the query at fault using the same connection
for all cluster setups. This would result in running the query only with
vectorize=on which is not what we want. We will now be opening up new
connections to the database after the cluster settings have been updated
in order to get the correct behavior for each of the setups.

Release note: None
@yuzefovich
Copy link
Copy Markdown
Member Author

Updated the PR to fix the problem with the wrong config being used during EXPLAIN ANALYZE (DEBUG) and confirmed manually that the bundles are as expected. RFAL.

Copy link
Copy Markdown
Contributor

@asubiotto asubiotto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained

@yuzefovich
Copy link
Copy Markdown
Member Author

TFTR!

bors r+

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Sep 10, 2020

Build succeeded:

@craig craig bot merged commit 8547a97 into cockroachdb:master Sep 10, 2020
@yuzefovich yuzefovich deleted the tpchvec branch September 10, 2020 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants