Skip to content

Commit

Permalink
Add 'failed get control bytes' and 'failed to get checkpoint bytes' t…
Browse files Browse the repository at this point in the history
…o list of expected errors
  • Loading branch information
Konstantin Knizhnik committed Dec 5, 2024
1 parent 76a5521 commit 0725293
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 0 additions & 1 deletion pageserver/src/walingest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,6 @@ impl WalIngest {
let new_checkpoint_bytes = self.checkpoint.encode()?;

modification.put_checkpoint(new_checkpoint_bytes)?;
enum_pgversion_dispatch!(&mut self.checkpoint, CheckPoint, cp, { cp.redo = 0 });
self.checkpoint_modified = false;
}

Expand Down
4 changes: 3 additions & 1 deletion test_runner/regress/test_broken_timeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ def test_local_corruption(neon_env_builder: NeonEnvBuilder):
".*failed to load metadata.*",
".*load failed.*load local timeline.*",
".*: layer load failed, assuming permanent failure:.*",
".*failed to get checkpoint bytes.*",
".*failed get control bytes.*",
]
)

Expand Down Expand Up @@ -75,7 +77,7 @@ def test_local_corruption(neon_env_builder: NeonEnvBuilder):
# (We don't check layer file contents on startup, when loading the timeline)
#
# This will change when we implement checksums for layers
with pytest.raises(Exception, match="get_values_reconstruct_data for layer ") as err:
with pytest.raises(Exception, match="failed to get checkpoint bytes") as err:
pg1.start()
log.info(
f"As expected, compute startup failed for timeline {tenant1}/{timeline1} with corrupt layers: {err}"
Expand Down
2 changes: 2 additions & 0 deletions test_runner/regress/test_timeline_archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -790,6 +790,8 @@ def test_timeline_retain_lsn(
[
".*initial size calculation failed: PageRead.MissingKey.could not find data for key.*",
".*page_service_conn_main.*could not find data for key.*",
".*failed to get checkpoint bytes.*",
".*failed get control bytes.*",
]
)
if offload_child is None or "no-restart" not in offload_child:
Expand Down

0 comments on commit 0725293

Please sign in to comment.