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: instantiate metrics for internal sql stats #65575

Merged
merged 1 commit into from
May 22, 2021

Conversation

Azhng
Copy link
Contributor

@Azhng Azhng commented May 21, 2021

Previously, we did not instantiate metrics for internal SQL stats.
However, this can cause issues when connExecutor is being created
by InternalExecutor. In order to address this, we also instantiate
metrics for internal stats.

Release note: None

Closes #65523

@Azhng Azhng requested review from rafiss, yuzefovich and a team May 21, 2021 20:38
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Member

@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.

Okay :/ :lgtm:

Reviewed 3 of 3 files at r1.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @rafiss)

Copy link
Collaborator

@rafiss rafiss left a comment

Choose a reason for hiding this comment

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

is there a test that can be written to prevent a regression?

Copy link
Collaborator

@rafiss rafiss left a comment

Choose a reason for hiding this comment

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

i wonder why the randomized test caused this, but none of the existing tests did?

@Azhng Azhng force-pushed the add-internal-sql-stats-metrics branch from eaf1a71 to 7cdf7bb Compare May 21, 2021 21:51
Copy link
Contributor Author

@Azhng Azhng left a comment

Choose a reason for hiding this comment

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

The randomized test failed because this bug is only trigger when the amount of fingerprint exceeded either the cluster setting limit or the memory limit.

I added a test to catch this.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @Azhng)

Copy link
Collaborator

@rafiss rafiss left a comment

Choose a reason for hiding this comment

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

awesome! thanks for the explanation and for the fix!

Previously, we did not instantiate metrics for internal SQL stats.
However, this can cause issues when connExecutor is being created
by InternalExecutor. In order to address this, we also instantiate
metrics for internal stats.

Release note: None

Closes cockroachdb#65523
@Azhng Azhng force-pushed the add-internal-sql-stats-metrics branch from 7cdf7bb to 0955915 Compare May 21, 2021 23:29
@Azhng
Copy link
Contributor Author

Azhng commented May 21, 2021

Hmm, bazel is not happy. Rebased see if that address the problem.

@Azhng
Copy link
Contributor Author

Azhng commented May 22, 2021

TFTR!

bors r+

@craig
Copy link
Contributor

craig bot commented May 22, 2021

Build succeeded:

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/tests: TestRandomSyntaxFunctions failed
4 participants