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: randomize optimizer testing knobs in most tests #94936

Closed
wants to merge 1 commit into from

Conversation

yuzefovich
Copy link
Member

This commit makes it so that we randomize the default values for testing_optimizer_cost_perturbation and
testing_optimizer_disable_rule_probability session variables in crdb_test builds. The only exceptions are the execbuilder and the SQLite logic tests in which we override the newly-introduced corresponding cluster settings to 0.

Fixes: #93825.

Release note: None

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@yuzefovich yuzefovich force-pushed the randomize-opt branch 2 times, most recently from 82cd470 to 9a12066 Compare January 9, 2023 19:41
craig bot pushed a commit that referenced this pull request Jan 11, 2023
94949: sql: propagate the settings properly into the stmt bundle builder r=yuzefovich a=yuzefovich

A few months ago we extended the collection of the cluster settings into the stmt bundle to also get the global default value. That getter method takes in a pointer to the current cluster settings' values, and we passed nil. This can cause nil pointer errors and is now fixed.

Found when working on #94936.

Epic: None

Release note: None

Co-authored-by: Yahor Yuzefovich <[email protected]>
@yuzefovich yuzefovich force-pushed the randomize-opt branch 2 times, most recently from 9748042 to abc8ed8 Compare January 20, 2023 00:52
This commit makes it so that we randomize the default values for
`testing_optimizer_cost_perturbation` and
`testing_optimizer_disable_rule_probability` session variables in
`crdb_test` builds. The only exceptions are the execbuilder and the
SQLite logic tests in which we override the newly-introduced
corresponding cluster settings to 0.

Release note: None
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.

sql: use optimizer cost perturbation and disable rule settings for metamorphic testing
2 participants