Skip to content

Commit 64ff3d0

Browse files
committed
fix
Signed-off-by: Alex Chi Z <[email protected]>
1 parent 5720401 commit 64ff3d0

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

pageserver/src/pgdatadir_mapping.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -778,16 +778,16 @@ impl Timeline {
778778
.await?;
779779
let mut rels = HashSet::new();
780780
for (key, val) in results {
781+
if key == REL_DIR_MIGRATION_KEY {
782+
// The key that determines the current migration status, skip it.
783+
continue;
784+
}
781785
let val = RelDirExists::decode(&val?).map_err(|_| {
782786
PageReconstructError::Other(anyhow::anyhow!(
783787
"invalid reldir key: decode failed, {}",
784788
key
785789
))
786790
})?;
787-
if key.field6 == 0 {
788-
// The key that determines the current migration status, skip it.
789-
continue;
790-
}
791791
if key.field6 != 1 {
792792
return Err(PageReconstructError::Other(anyhow::anyhow!(
793793
"invalid reldir key: field6 != 1, {}",
@@ -813,11 +813,11 @@ impl Timeline {
813813
forknum: key.field5,
814814
};
815815
if val == RelDirExists::Removed {
816-
debug_assert!(!rels.contains(&tag), "removed reltag in v2");
816+
debug_assert!(!rels.contains(&tag), "removed reltag in v2: {tag}");
817817
continue;
818818
}
819819
let did_not_contain = rels.insert(tag);
820-
debug_assert!(did_not_contain, "duplicate reltag in v2");
820+
debug_assert!(did_not_contain, "duplicate reltag in v2: {tag}");
821821
}
822822
Ok(rels)
823823
}

0 commit comments

Comments
 (0)