-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
scheduledlogging: fix TestCaptureIndexUsageStats for secondary tenants #109783
scheduledlogging: fix TestCaptureIndexUsageStats for secondary tenants #109783
Conversation
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
c13360c
to
5add509
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! 1 of 0 LGTMs obtained
bors r+ |
Build succeeded: |
Encountered an error creating backports. Some common things that can go wrong:
You might need to create your backport manually using the backport tool. error creating merge commit from 5add509 to blathers/backport-release-23.1-109783: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict [] you may need to manually resolve merge conflicts with the backport tool. Backport to branch 23.1.x failed. See errors above. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
This commit reverts cockroachdb#109783 which added a `SucceedsSoon` in place of testing each anticipated sheduling of index usage stats recording. Since this test checks the number of logs emitted after each schedule, adding `SucceedsSoon` meant that entering a retry loop could actually mean we fall into the next scheduled index usage stats emission, thus surpassing the expected number of logs for the schedule number being checked. This addition was meant to fix the test for secondary tenants by waiting for all schedules of tenants to run. This commit instead disables index usage stats for the system tenant, allowing us to once again synchronize a single tenant's schedule in order to verify the logs. Fixes: cockroachdb#109924
This commit reverts cockroachdb#109783 which added a `SucceedsSoon` in place of testing each anticipated sheduling of index usage stats recording. Since this test checks the number of logs emitted after each schedule, adding `SucceedsSoon` meant that entering a retry loop could actually mean we fall into the next scheduled index usage stats emission, thus surpassing the expected number of logs for the schedule number being checked. This addition was meant to fix the test for secondary tenants by waiting for all schedules of tenants to run. This commit instead disables index usage stats for the system tenant, allowing us to once again synchronize a single tenant's schedule in order to verify the logs. Fixes: cockroachdb#109924 Release note: None
110224: scheduledlogging: fix `TestCaptureIndexUsageStats` r=xinhaoz a=xinhaoz This commit reverts #109783 which added a `SucceedsSoon` in place of testing each anticipated sheduling of index usage stats recording. Since this test checks the number of logs emitted after each schedule, adding `SucceedsSoon` meant that entering a retry loop could actually mean we fall into the next scheduled index usage stats emission, thus surpassing the expected number of logs for the schedule number being checked. This addition was meant to fix the test for secondary tenants by waiting for all schedules of tenants to run. This commit instead disables index usage stats for the system tenant, allowing us to once again synchronize a single tenant's schedule in order to verify the logs. Fixes: #109924 Release note: None Co-authored-by: Xin Hao Zhang <[email protected]>
This commit reverts cockroachdb#109783 which added a `SucceedsSoon` in place of testing each anticipated sheduling of index usage stats recording. Since this test checks the number of logs emitted after each schedule, adding `SucceedsSoon` meant that entering a retry loop could actually mean we fall into the next scheduled index usage stats emission, thus surpassing the expected number of logs for the schedule number being checked. This addition was meant to fix the test for secondary tenants by waiting for all schedules of tenants to run. This commit instead disables index usage stats for the system tenant, allowing us to once again synchronize a single tenant's schedule in order to verify the logs. Fixes: cockroachdb#109924 Release note: None
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