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: statement bundles are missing schema, environment, or table statistics #80396

Closed
mgartner opened this issue Apr 22, 2022 · 2 comments · Fixed by #80405
Closed

sql: statement bundles are missing schema, environment, or table statistics #80396

mgartner opened this issue Apr 22, 2022 · 2 comments · Fixed by #80405
Assignees
Labels
branch-release-22.1 Used to mark GA and release blockers, technical advisories, and bugs for 22.1 C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. deprecated-branch-release-22.1.0 GA-blocker T-sql-queries SQL Queries Team

Comments

@mgartner
Copy link
Collaborator

mgartner commented Apr 22, 2022

On release-22.1.0 (current at dc22506), the env.sql, schema.sql, and stats*.sql files have errors like:

error getting version: no user specified for internal query

These files contain none of the usual information. I first noticed this problem when collecting a statement bundle for the telemetry cluster which was running v22.1.0-beta.2.

Marking this as a GA blocker because the information in these files is absolutely critical for diagnosing performance problems.

Jira issue: CRDB-15958

@mgartner mgartner added C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. GA-blocker labels Apr 22, 2022
@blathers-crl blathers-crl bot added the T-sql-queries SQL Queries Team label Apr 22, 2022
@blathers-crl
Copy link

blathers-crl bot commented Apr 22, 2022

Hi @mgartner, please add branch-* labels to identify which branch(es) this release-blocker affects.

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan.

@mgartner mgartner added branch-release-22.1 Used to mark GA and release blockers, technical advisories, and bugs for 22.1 deprecated-branch-release-22.1.0 blocks-22.1.0-rc.1 labels Apr 22, 2022
@mgartner mgartner self-assigned this Apr 22, 2022
@mgartner
Copy link
Collaborator Author

I've bisected to 203c7f4.

mgartner added a commit to mgartner/cockroach that referenced this issue Apr 22, 2022
A regression was introduced in cockroachdb#71246 that caused errors when running
internal queries to populate files in statement bundles. As a result,
critical information was missing from the `env.sql`, `schema.sql`, and
`stats*.sql` files. This commit fixes the issue by using an
`InternalExecutorOverride` with a root user override. A root user is
required because a node user is insufficient - it does not have
privileges on user-defined relations which is needed for the
`SHOW CREATE` queries that populate `schema.sql`.

Fixes cockroachdb#80396

Release note: None
mgartner added a commit to mgartner/cockroach that referenced this issue Apr 22, 2022
A regression was introduced in cockroachdb#71246 that caused errors when running
internal queries to populate files in statement bundles. As a result,
critical information was missing from the `env.sql`, `schema.sql`, and
`stats*.sql` files. This commit fixes the issue by using the internal
executor factory to create an internal executor with the current
session's session data.

Fixes cockroachdb#80396

Release note: None
@craig craig bot closed this as completed in 911ebee Apr 24, 2022
blathers-crl bot pushed a commit that referenced this issue Apr 24, 2022
A regression was introduced in #71246 that caused errors when running
internal queries to populate files in statement bundles. As a result,
critical information was missing from the `env.sql`, `schema.sql`, and
`stats*.sql` files. This commit fixes the issue by using the internal
executor factory to create an internal executor with the current
session's session data.

Fixes #80396

Release note: None
blathers-crl bot pushed a commit that referenced this issue Apr 24, 2022
A regression was introduced in #71246 that caused errors when running
internal queries to populate files in statement bundles. As a result,
critical information was missing from the `env.sql`, `schema.sql`, and
`stats*.sql` files. This commit fixes the issue by using the internal
executor factory to create an internal executor with the current
session's session data.

Fixes #80396

Release note: None
@mgartner mgartner moved this to Done in SQL Queries Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
branch-release-22.1 Used to mark GA and release blockers, technical advisories, and bugs for 22.1 C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. deprecated-branch-release-22.1.0 GA-blocker T-sql-queries SQL Queries Team
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants