From d4d4741485b321f30ad4227271822a98369f3752 Mon Sep 17 00:00:00 2001 From: John Spray Date: Thu, 16 Nov 2023 14:46:36 +0100 Subject: [PATCH] timeline: always repartition (TODO: instead, we should change initial partitioning to include basebackup/metadata cuts) --- pageserver/src/tenant/timeline.rs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/pageserver/src/tenant/timeline.rs b/pageserver/src/tenant/timeline.rs index bbb96cb172..7a2f769096 100644 --- a/pageserver/src/tenant/timeline.rs +++ b/pageserver/src/tenant/timeline.rs @@ -2746,18 +2746,18 @@ impl Timeline { partition_size: u64, ctx: &RequestContext, ) -> anyhow::Result<(KeyPartitioning, Lsn)> { - { - let partitioning_guard = self.partitioning.lock().unwrap(); - let distance = lsn.0 - partitioning_guard.1 .0; - if partitioning_guard.1 != Lsn(0) && distance <= self.repartition_threshold { - debug!( - distance, - threshold = self.repartition_threshold, - "no repartitioning needed" - ); - return Ok((partitioning_guard.0.clone(), partitioning_guard.1)); - } - } + // { + // let partitioning_guard = self.partitioning.lock().unwrap(); + // let distance = lsn.0 - partitioning_guard.1 .0; + // if partitioning_guard.1 != Lsn(0) && distance <= self.repartition_threshold { + // debug!( + // distance, + // threshold = self.repartition_threshold, + // "no repartitioning needed" + // ); + // return Ok((partitioning_guard.0.clone(), partitioning_guard.1)); + // } + // } let keyspace = self.collect_keyspace(lsn, ctx).await?; let partitioning = keyspace.partition(partition_size);