Skip to content

[6/n] [reconfigurator] refactor rendezvous_sled_bp_availability writes - #11209

Merged
sunshowers merged 5 commits into
mainfrom
sunshowers/spr/6n-reconfigurator-refactor-rendezvous_sled_bp_availability-writes
Sep 4, 2026
Merged

[6/n] [reconfigurator] refactor rendezvous_sled_bp_availability writes#11209
sunshowers merged 5 commits into
mainfrom
sunshowers/spr/6n-reconfigurator-refactor-rendezvous_sled_bp_availability-writes

Conversation

@sunshowers

Copy link
Copy Markdown
Contributor

I know I just introduced this very recently, but I realized that we have other use cases that would benefit from a bulk write API.

This doesn't have any functional changes -- it only converts the way the datastore layer works from lots of little calls to one single bulk call.

Created using spr 1.3.6-beta.1
Created using spr 1.3.6-beta.1
Comment thread nexus/db-queries/src/db/datastore/rendezvous_sled_bp_availability.rs Outdated
Comment thread nexus/db-queries/src/db/datastore/rendezvous_sled_bp_availability.rs Outdated
Created using spr 1.3.6-beta.1
@sunshowers

sunshowers commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

Made the following changes:

  • Review feedback.
  • Add a log_to_and_count which the bg task uses, and rack init will use in the future.
  • Add some tests for partial failures, including convergence on retry.

Created using spr 1.3.6-beta.1

impl SledBpAvailabilityWrite {
/// Log this write to the given logger, and increment the corresponding
/// scount in `stats`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// scount in `stats`.
/// count in `stats`.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I'd fixed it locally but forgot to amend my local commit. (But also a typo is pretty good evidence that I didn't have Claude write it ;) )

let rejected_upsert = sled(3);
let rejected_decommission = sled(13);

// Inject a deterministic failure via a test-only CHECK constraint.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ooh this is a cool technique 👍

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wish I could claim credit for it, but all I did was push Fable to find a way lol

Created using spr 1.3.6-beta.1
@sunshowers
sunshowers enabled auto-merge (squash) September 4, 2026 17:06
@sunshowers
sunshowers merged commit 61bd0ee into main Sep 4, 2026
20 checks passed
@sunshowers
sunshowers deleted the sunshowers/spr/6n-reconfigurator-refactor-rendezvous_sled_bp_availability-writes branch September 4, 2026 18:19
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