From 9351ba26ff5c9dd2940889021b81a2aaba3af9b3 Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas Date: Thu, 12 Sep 2024 21:44:29 +0300 Subject: [PATCH] Fake LSN Test passes, yay! --- pageserver/src/pg_import.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pageserver/src/pg_import.rs b/pageserver/src/pg_import.rs index a41ab2a87f..4d6ef9a527 100644 --- a/pageserver/src/pg_import.rs +++ b/pageserver/src/pg_import.rs @@ -310,8 +310,12 @@ impl PgImportEnv { }; let metadata = TimelineMetadata::new( - self.pgdata_lsn, - None, // prev_record_lsn + // FIXME: The 'disk_consistent_lsn' should be the LSN at the *end* of the + // checkpoint record, and prev_record_lsn should point to its beginning. + // We should read the real end of the record from the WAL, but here we + // just fake it. + Lsn(self.pgdata_lsn.0 + 8), + Some(self.pgdata_lsn), None, // no ancestor Lsn(0), self.pgdata_lsn, // latest_gc_cutoff_lsn