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

tenantcostserver: fix erroneous panic in tests #70094

Merged
merged 1 commit into from
Sep 13, 2021

Conversation

RaduBerinde
Copy link
Member

The test-only code that checks the invariants of the tenant_usage
table inadvertently panics if the query hits an error (such as one
that would be expected if the server is shutting down). We now just
log the error instead.

Fixes #70089.

Release note: None

Release justification: non-production code change to fix test failure.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Contributor

@andy-kimball andy-kimball left a comment

Choose a reason for hiding this comment

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

:lgtm:

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

Copy link
Contributor

@ajwerner ajwerner left a comment

Choose a reason for hiding this comment

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

:lgtm:

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


pkg/ccl/multitenantccl/tenantcostserver/system_table.go, line 434 at r2 (raw file):

	)
	if err != nil {
		log.Warningf(ctx, "checkInvariants query failed: %v", err)

nit: wrap this in if ctx.Err() == nil {...}

The test-only code that checks the invariants of the `tenant_usage`
table inadvertently panics if the query hits an error (such as one
that would be expected if the server is shutting down). We now just
log the error instead.

Fixes cockroachdb#70089.

Release note: None

Release justification: non-production code change to fix test failure.
Copy link
Member Author

@RaduBerinde RaduBerinde left a comment

Choose a reason for hiding this comment

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

TFTRs!

bors r+

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

@craig
Copy link
Contributor

craig bot commented Sep 13, 2021

Build succeeded:

@craig craig bot merged commit e19274a into cockroachdb:master Sep 13, 2021
@RaduBerinde RaduBerinde deleted the fix-invariants-panic branch September 21, 2021 20:47
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.

ccl/serverccl: TestTenantCannotSetClusterSetting failed
4 participants