From 2c424c8f4e546ca7b7194cdc22030b2c6088b983 Mon Sep 17 00:00:00 2001 From: Christian Schwarz Date: Wed, 24 May 2023 17:19:22 +0200 Subject: [PATCH] Revert "activate_timelines counter is now == not_broken_timelines.len()" not_broken_timelines is an iterator, doesn't have `len()`. This reverts commit 4001f441c06b9aee4c422133e08fbfa622449e51. --- pageserver/src/tenant.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pageserver/src/tenant.rs b/pageserver/src/tenant.rs index 3dee71c3c1..06de916054 100644 --- a/pageserver/src/tenant.rs +++ b/pageserver/src/tenant.rs @@ -1652,8 +1652,11 @@ impl Tenant { // down when they notice that the tenant is inactive. tasks::start_background_loops(self.tenant_id); + let mut activated_timelines = 0; + for timeline in not_broken_timelines { timeline.activate(broker_client.clone(), ctx); + activated_timelines += 1; } let elapsed = self.loading_started_at.elapsed(); @@ -1664,7 +1667,7 @@ impl Tenant { info!( since_creation_millis = elapsed.as_millis(), tenant_id = %self.tenant_id, - activated_timelines = not_broken_timelines.len(), + activated_timelines, total_timelines, post_state = <&'static str>::from(&*current_state), "activation attempt finished"