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: refactor non-mutable members up into Service #7086

Merged
merged 1 commit into from
Mar 11, 2024

Conversation

jcsp
Copy link
Collaborator

@jcsp jcsp commented Mar 11, 2024

result_tx and compute_hook were in ServiceState (i.e. behind a sync mutex), but didn't need to be.

Moving them up into Service removes a bunch of boilerplate clones.

While we're here, create a helper Service::maybe_reconcile_shard which avoids writing out all the &self. arguments to TenantState::maybe_reconcile everywhere we call it.

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 added a/tech_debt Area: related to tech debt c/storage/controller Component: Storage Controller labels Mar 11, 2024
@jcsp jcsp requested review from arpad-m and VladLazar March 11, 2024 13:31
@jcsp jcsp requested a review from a team as a code owner March 11, 2024 13:31
Copy link

2496 tests run: 2376 passed, 0 failed, 120 skipped (full report)


Flaky tests (1)

Postgres 15

  • test_vm_bit_clear_on_heap_lock: release

Code coverage* (full report)

  • functions: 28.8% (7033 of 24444 functions)
  • lines: 47.6% (43451 of 91295 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
b0e7e05 at 2024-03-11T14:27:07.223Z :recycle:

@jcsp jcsp merged commit b4972d0 into main Mar 11, 2024
56 checks passed
@jcsp jcsp deleted the jcsp/storcon-immutable-members branch March 11, 2024 14:29
VladLazar pushed a commit that referenced this pull request Mar 12, 2024
result_tx and compute_hook were in ServiceState (i.e. behind a sync
mutex), but didn't need to be.

Moving them up into Service removes a bunch of boilerplate clones.

While we're here, create a helper `Service::maybe_reconcile_shard` which
avoids writing out all the `&self.` arguments to
`TenantState::maybe_reconcile` everywhere we call it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a/tech_debt Area: related to tech debt c/storage/controller Component: Storage Controller
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants