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/schemachanger: EXPLAIN on declarative schema changer statements generates event log entries #118897

Closed
fqazi opened this issue Feb 7, 2024 · 0 comments · Fixed by #120563
Closed
Assignees
Labels
branch-master Failures on the master branch. branch-release-23.1 Used to mark GA and release blockers and technical advisories for 23.1 branch-release-23.2 Used to mark GA and release blockers and technical advisories for 23.2 C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions)

Comments

@fqazi
Copy link
Collaborator

fqazi commented Feb 7, 2024

Originally the declarative schema changer generated event log entries as a during the execution of the actual schema change. But, later we decided to start emitting entries during the build phase (#95786) , unfortunately as a part of this work we start emitting event log entries when an EXPLAN command is also executed incorrectly.

Jira issue: CRDB-35951

Epic CRDB-35306

@fqazi fqazi added C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. branch-master Failures on the master branch. T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) branch-release-23.1 Used to mark GA and release blockers and technical advisories for 23.1 branch-release-23.2 Used to mark GA and release blockers and technical advisories for 23.2 labels Feb 7, 2024
@blathers-crl blathers-crl bot added this to Triage in SQL Foundations Feb 7, 2024
@fqazi fqazi changed the title sql/schemachanger: EXPLAIN in the declarative schema changer generates event log entries sql/schemachanger: EXPLAIN on declarative schema changer statements generates event log entries Feb 7, 2024
@fqazi fqazi self-assigned this Feb 20, 2024
fqazi added a commit to fqazi/cockroach that referenced this issue Mar 15, 2024
Previously, the declarative schema changer could generate event log
entries even when DDL was only being explained. This created a
misleading impression that schema changes had been executed. This patch
modifies the declarative schema changer to prevent instant logging of
events. Instead, it returns a callback that can be executed
before the statement phase.

Fixes: cockroachdb#118897

Release note (bug fix): EXPLAIN (DDL) would generate event log
entries for schema changes even though they weren't executed.
craig bot pushed a commit that referenced this issue Mar 19, 2024
120563: sql/schemachanger: avoid generating event logs during EXPLAIN (DDL) r=fqazi a=fqazi

Previously, the declarative schema changer could generate event log entries even when DDL was only being explained. This created a misleading impression that schema changes had been executed. This patch modifies the declarative schema changer to prevent instant logging of events. Instead, it returns a callback that can be executed before the statement phase.

Fixes: #118897

Release note (bug fix): EXPLAIN (DDL) would generate event log entries for schema changes even though they weren't executed.

120717: build: fix pebble nightly build script for 23.2 r=RaduBerinde a=itsbilal

The crl-release-23.2 branch is currently right at a version tag. This trips up the pebble_nightly_build_test_binary script as it expects it to end in a SHA like v0.0.0-20220214174839-6af77d5598c9 while it is just v1.1.0. This change fixes it to also account for that case, so crossversion tests on 23.2 can be run.

Epic: none

Release note: None

Co-authored-by: Faizan Qazi <faizan@cockroachlabs.com>
Co-authored-by: Bilal Akhtar <bilal@cockroachlabs.com>
@craig craig bot closed this as completed in 3ef8f32 Mar 19, 2024
SQL Foundations automation moved this from Triage to Done Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
branch-master Failures on the master branch. branch-release-23.1 Used to mark GA and release blockers and technical advisories for 23.1 branch-release-23.2 Used to mark GA and release blockers and technical advisories for 23.2 C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions)
Projects
Development

Successfully merging a pull request may close this issue.

1 participant