Skip to content

sql: add cluster setting to change session defaults for IE#122855

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
yuzefovich:ie-override
Apr 26, 2024
Merged

sql: add cluster setting to change session defaults for IE#122855
craig[bot] merged 1 commit intocockroachdb:masterfrom
yuzefovich:ie-override

Conversation

@yuzefovich
Copy link
Copy Markdown
Member

This commit adds an undocumented cluster setting sql.internal_executor.session_overrides that allows specifying comma-separated list of 'variable=value' pairs that will override the corresponding session variables for all InternalExecutors. This can provide an escape hatch in case we find a bug that can be disabled via a session variable.

Fixes: #122542.

Release note: None

This commit adds an undocumented cluster setting
`sql.internal_executor.session_overrides` that allows specifying
comma-separated list of 'variable=value' pairs that will override the
corresponding session variables for all InternalExecutors. This can
provide an escape hatch in case we find a bug that can be disabled via
a session variable.

Release note: None
@yuzefovich yuzefovich added backport-23.2.x PAST MAINTENANCE SUPPORT: 23.2 patch releases via ER request only backport-24.1.x Flags PRs that need to be backported to 24.1. labels Apr 22, 2024
@yuzefovich yuzefovich requested a review from mgartner April 22, 2024 21:33
@yuzefovich yuzefovich requested a review from a team as a code owner April 22, 2024 21:33
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Copy link
Copy Markdown
Collaborator

@michae2 michae2 left a comment

Choose a reason for hiding this comment

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

Reviewed all commit messages.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @mgartner and @yuzefovich)


pkg/sql/internal.go line 877 at r1 (raw file):

var ieMultiOverride = settings.RegisterStringSetting(
	settings.ApplicationLevel,

Which roles can set this setting?

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.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @mgartner and @michae2)


pkg/sql/internal.go line 877 at r1 (raw file):

Previously, michae2 (Michael Erickson) wrote…

Which roles can set this setting?

Good question - everyone how can modify other cluster settings, so those with MODIFYCLUSTERSETTING privilege. This seems reasonable to me - the setting is not marked as public and there is no release note, so it'll remain undocumented.

Copy link
Copy Markdown
Collaborator

@michae2 michae2 left a comment

Choose a reason for hiding this comment

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

:lgtm: Very nice! Now let's hope we never have to use it!

Reviewed 2 of 2 files at r1.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @mgartner and @yuzefovich)


pkg/sql/opt/exec/execbuilder/testdata/execute_internally_builtin line 97 at r1 (raw file):


query T
SELECT crdb_internal.execute_internally('SHOW optimizer_use_histograms;', false);

Nice pair of features you've created here! 🙂

@yuzefovich
Copy link
Copy Markdown
Member Author

Fingers crossed lol

TFTR!

bors r+

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Apr 26, 2024

@blathers-crl
Copy link
Copy Markdown

blathers-crl bot commented Apr 26, 2024

Encountered an error creating backports. Some common things that can go wrong:

  1. The backport branch might have already existed.
  2. There was a merge conflict.
  3. The backport branch contained merge commits.

You might need to create your backport manually using the backport tool.


error creating merge commit from 66a4ea9 to blathers/backport-release-23.2-122855: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict []

you may need to manually resolve merge conflicts with the backport tool.

Backport to branch 23.2.x failed. See errors above.


🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-23.2.x PAST MAINTENANCE SUPPORT: 23.2 patch releases via ER request only backport-24.1.x Flags PRs that need to be backported to 24.1.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sql: add a way of changing session variables for internal executor

3 participants