From 468366a28f60c352b36cdc9eb657a2ac95762729 Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas Date: Wed, 23 Feb 2022 10:17:00 +0200 Subject: [PATCH] Fix wrong 'lsn' stored in test page image The test creates a page version with a string like "foo 123 at 0/10" as the content. But the LSN stored in that string was wrong: the page version stored at LSN 0/20 would say "foo at 0/10". --- pageserver/src/repository.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pageserver/src/repository.rs b/pageserver/src/repository.rs index 348052973e..8527430357 100644 --- a/pageserver/src/repository.rs +++ b/pageserver/src/repository.rs @@ -746,8 +746,8 @@ mod tests { let mut lsn = 0x10; for blknum in 0..pg_constants::RELSEG_SIZE + 1 { - let img = TEST_IMG(&format!("foo blk {} at {}", blknum, Lsn(lsn))); lsn += 0x10; + let img = TEST_IMG(&format!("foo blk {} at {}", blknum, Lsn(lsn))); writer.put_page_image(TESTREL_A, blknum as BlockNumber, Lsn(lsn), img)?; } writer.advance_last_record_lsn(Lsn(lsn));