From 9f01840c185f93645cdaaf0182c18bfa7beb97da Mon Sep 17 00:00:00 2001 From: Christian Schwarz Date: Sat, 26 Jul 2025 17:21:25 +0200 Subject: [PATCH] use standby_horizon leases feature in the test, demonstrating that it passes now --- pageserver/src/page_service.rs | 2 +- test_runner/regress/test_hot_standby.py | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/pageserver/src/page_service.rs b/pageserver/src/page_service.rs index fc8263e3c1..993f4401e3 100644 --- a/pageserver/src/page_service.rs +++ b/pageserver/src/page_service.rs @@ -2236,7 +2236,7 @@ impl PageServerHandler { Ok(()) } - #[instrument(skip_all, fields(shard_id, %lsn))] + #[instrument(skip_all, fields(shard_id, %lsn), ret)] async fn handle_lease_standby_horizon( &mut self, pgb: &mut PostgresBackend, diff --git a/test_runner/regress/test_hot_standby.py b/test_runner/regress/test_hot_standby.py index 1ff61ce8dc..957af82cda 100644 --- a/test_runner/regress/test_hot_standby.py +++ b/test_runner/regress/test_hot_standby.py @@ -133,14 +133,20 @@ def test_hot_standby_gc(neon_env_builder: NeonEnvBuilder, pause_apply: bool): tenant_conf = { # set PITR interval to be small, so we can do GC "pitr_interval": "0 s", + # this test tests standby_horizon leases feature + "standby_horizon_lease_length": "10s", } env = neon_env_builder.init_start(initial_tenant_conf=tenant_conf) timeline_id = env.initial_timeline tenant_id = env.initial_tenant + # enable the compute feature t + compute_features = ['standby_horizon_leases_experimental'] + with env.endpoints.create_start( branch_name="main", endpoint_id="primary", + features=compute_features, ) as primary: with env.endpoints.new_replica_start( origin=primary, @@ -149,6 +155,7 @@ def test_hot_standby_gc(neon_env_builder: NeonEnvBuilder, pause_apply: bool): # that this test exercises. With protocol version 1 it # fails. config_lines=["neon.protocol_version=2"], + features=compute_features, ) as secondary: p_cur = primary.connect().cursor() p_cur.execute("CREATE EXTENSION neon_test_utils")