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/scheduledlogging: TestCaptureIndexUsageStats does not work with secondary tenants #109465

Closed
knz opened this issue Aug 24, 2023 · 0 comments · Fixed by #109783
Closed

sql/scheduledlogging: TestCaptureIndexUsageStats does not work with secondary tenants #109465

knz opened this issue Aug 24, 2023 · 0 comments · Fixed by #109783
Assignees
Labels
A-multitenancy Related to multi-tenancy C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.

Comments

@knz
Copy link
Contributor

knz commented Aug 24, 2023

Describe the problem

When pointed to a secondary tenant, the test TestCaptureIndexUsageStats fails:

    captured_index_usage_stats_test.go:166:
                Error Trace:    github.com/cockroachdb/cockroach/pkg/sql/scheduledlogging/captured_index_usage_stats_test.go:166
                Error:          Received unexpected error:
                                expected 8 total entries, got 0

Expected behavior

The test should work.

Epic: CRDB-26687

Jira issue: CRDB-30938

@knz knz added C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. A-multitenancy Related to multi-tenancy T-cluster-observability labels Aug 24, 2023
zachlite pushed a commit to zachlite/cockroach that referenced this issue Aug 30, 2023
This commit fixes flaky behavior when TestCaptureIndexUsageStats
is run for secondary tenants. The previous synchronization mechanism
between logging and the test was not consistent between system and
secondary tenants.

Instead, there's no attempt to synchronize, and we rely on
testutils.SucceedsSoon instead.

Resolves cockroachdb#109465
Epic: none
Release note: None
craig bot pushed a commit that referenced this issue Sep 1, 2023
109783: scheduledlogging: fix TestCaptureIndexUsageStats for secondary tenants r=zachlite a=zachlite

This commit fixes flaky behavior when TestCaptureIndexUsageStats is run for secondary tenants. The previous synchronization mechanism between logging and the test was not consistent between system and secondary tenants.

Instead, there's no attempt to synchronize, and we rely on testutils.SucceedsSoon instead.

Resolves #109465
Epic: none
Release note: None

Co-authored-by: Zach Lite <[email protected]>
@craig craig bot closed this as completed in 5add509 Sep 1, 2023
zachlite pushed a commit to zachlite/cockroach that referenced this issue Sep 1, 2023
This commit fixes flaky behavior when TestCaptureIndexUsageStats
is run for secondary tenants. The previous synchronization mechanism
between logging and the test was not consistent between system and
secondary tenants.

Instead, there's no attempt to synchronize, and we rely on
testutils.SucceedsSoon instead.

Resolves cockroachdb#109465
Epic: none
Release note: None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-multitenancy Related to multi-tenancy C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants