Skip to content

Shorten the time it takes to process bucket pool #7356

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

Merged
merged 4 commits into from
Feb 10, 2025
Merged

Conversation

torcolvin
Copy link
Collaborator

@torcolvin torcolvin commented Feb 4, 2025

  • Create test buckets in the background instead of before the tests. This shortens time in the case of no running tests, all tests are skipped, or a test only requires a single bucket.
  • Do not wait for buckets to be torn down for test exit, since they will be deleted in the next test run.
  • Only create 3 collections when we need to, otherwise create two.
  • Put bucket into readyBucketPool directly instead of addToBucketReadierQueue after creation. Dropping the immediate flush saves about 6 secs per bucket for the buckets to become ready.
  • Running the bucket creation in parallel is faster when Flush buckets are used, but slower when GSI is used, so running parallel init is off by default.

I would say my favorite features are creating test buckets asynchronously and not waiting for bucket teardown in test exit. This speeds up running tests interactively a good deal, especially when running small numbers of tests. One thing that it protects against is using -run TestFoo where TestFoo accidentally doesn't match anything, but the bucket pool has to start up for you to know that. Additionally, this means not having to reset SG_TEST_BUCKET_POOL_SIZE when running tests locally, since you only have to wait for as many buckets as you need for the test to run.

I can take or leave some of the other changes. If there's consensus about any of the changes, I'll dump them back into a jira ticket.

Integration Tests

- Create test buckets in the background instead of before the tests.
  This shortens time in the case of no running tests, all tests are
  skipped, or a test only requires a single bucket.
- Do not wait for buckets to be torn down for test exit, since they will
  be deleted in the next test run.
- Only create 3 collections when we need to, otherwise create two.
- Put bucket into readyBucketPool directly instead of
  addToBucketReadierQueue after creation. Dropping the immediate flush
  saves about 6 secs per bucket for the buckets to become ready.
- Running the bucket creation in parallel is faster when Flush buckets
  are used, but slower when GSI is used, so running parallel init is
  off by default.
@bbrks bbrks self-assigned this Feb 6, 2025
@torcolvin torcolvin merged commit 44d6aa5 into main Feb 10, 2025
38 checks passed
@torcolvin torcolvin deleted the ci-shorten-timeout branch February 10, 2025 18:24
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.

2 participants