From 62aa8f2ba23ed164c15941682d84f7a1493f31d7 Mon Sep 17 00:00:00 2001 From: John Spray Date: Fri, 4 Oct 2024 09:56:56 +0000 Subject: [PATCH] hacky way to make tests pass --- storage_controller/src/tenant_shard.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/storage_controller/src/tenant_shard.rs b/storage_controller/src/tenant_shard.rs index fd189e4951..bde6aa488b 100644 --- a/storage_controller/src/tenant_shard.rs +++ b/storage_controller/src/tenant_shard.rs @@ -833,10 +833,13 @@ impl TenantShard { continue; }; + // TODO: make this AZ aware: secondary should be chosen "As if I am an attachment, but + // in a different AZ to my actual preferred AZ" + // Let the scheduler suggest a node, where it would put us if we were scheduling afresh // This implicitly limits the choice to nodes that are available, and prefers nodes // with lower utilization. - let Ok(candidate_node) = scheduler.schedule_shard::( + let Ok(candidate_node) = scheduler.schedule_shard::( &self.intent.all_pageservers(), &self.preferred_az_id, schedule_context,