From 9085b0b7a2ee27ef160c23d6c9c84a8cb8f3de3d Mon Sep 17 00:00:00 2001 From: John Spray Date: Wed, 28 Feb 2024 12:06:03 +0000 Subject: [PATCH] control_plane: update shard config from location_config --- control_plane/attachment_service/src/service.rs | 1 + control_plane/attachment_service/src/tenant_state.rs | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/control_plane/attachment_service/src/service.rs b/control_plane/attachment_service/src/service.rs index 8a80d0c746..14cf3c8a56 100644 --- a/control_plane/attachment_service/src/service.rs +++ b/control_plane/attachment_service/src/service.rs @@ -1273,6 +1273,7 @@ impl Service { } } + shard.config = req.config.tenant_conf.clone(); shard.schedule(scheduler)?; let maybe_waiter = shard.maybe_reconcile( diff --git a/control_plane/attachment_service/src/tenant_state.rs b/control_plane/attachment_service/src/tenant_state.rs index 02f0171c29..a09a077aaa 100644 --- a/control_plane/attachment_service/src/tenant_state.rs +++ b/control_plane/attachment_service/src/tenant_state.rs @@ -615,6 +615,10 @@ impl TenantState { return None; }; + // Advance the sequence before spawning a reconciler, so that sequence waiters + // can distinguish between before+after the reconcile completes. + self.sequence = self.sequence.next(); + let reconciler_cancel = cancel.child_token(); let mut reconciler = Reconciler { tenant_shard_id: self.tenant_shard_id,