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

storage controller: make direct tenant creation more robust #7247

Merged
merged 1 commit into from
Mar 26, 2024

Conversation

jcsp
Copy link
Contributor

@jcsp jcsp commented Mar 26, 2024

Problem

  • Creations were not idempotent (unique key violation)
  • Creations waited for reconciliation, which control plane blocks while an operation is in flight

Summary of changes

  • Handle unique key constraint violation as an OK situation: if we're creating the same tenant ID and shard count, it's reasonable to assume this is a duplicate creation.
  • Make the wait for reconcile during creation tolerate failures: this is similar to location_conf, where the cloud control plane blocks our notification calls until it is done with calling into our API (in future this constraint is expected to relax as the cloud control plane learns to run multiple operations concurrently for a tenant)

Checklist before requesting a review

  • I have performed a self-review of my code.
  • If it is a core feature, I have added thorough tests.
  • Do we need to implement analytics? if so did you add the relevant metrics to the dashboard?
  • If this PR requires public announcement, mark it with /release-notes label and add several sentences in this section.

Checklist before merging

  • Do not forget to reformat commit message to not include the above checklist

@jcsp jcsp marked this pull request as ready for review March 26, 2024 14:30
@jcsp jcsp requested a review from a team as a code owner March 26, 2024 14:30
@jcsp jcsp requested a review from VladLazar March 26, 2024 14:30
Copy link

2718 tests run: 2581 passed, 0 failed, 137 skipped (full report)


Flaky tests (2)

Postgres 15

  • test_empty_branch_remote_storage_upload: debug

Postgres 14

  • test_empty_branch_remote_storage_upload: debug

Code coverage* (full report)

  • functions: 28.1% (6284 of 22346 functions)
  • lines: 47.0% (44208 of 94097 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
7dcc293 at 2024-03-26T15:08:11.155Z :recycle:

@jcsp jcsp added t/bug Issue Type: Bug c/storage/controller Component: Storage Controller labels Mar 26, 2024
@jcsp jcsp merged commit b3bb1d1 into main Mar 26, 2024
56 of 59 checks passed
@jcsp jcsp deleted the jcsp/storcon-tenant-creation branch March 26, 2024 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c/storage/controller Component: Storage Controller t/bug Issue Type: Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants