mirror of
https://github.com/neondatabase/neon.git
synced 2025-12-23 06:09:59 +00:00
use standby_horizon leases feature in the test, demonstrating that it passes now
This commit is contained in:
@@ -2236,7 +2236,7 @@ impl PageServerHandler {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[instrument(skip_all, fields(shard_id, %lsn))]
|
#[instrument(skip_all, fields(shard_id, %lsn), ret)]
|
||||||
async fn handle_lease_standby_horizon<IO>(
|
async fn handle_lease_standby_horizon<IO>(
|
||||||
&mut self,
|
&mut self,
|
||||||
pgb: &mut PostgresBackend<IO>,
|
pgb: &mut PostgresBackend<IO>,
|
||||||
|
|||||||
@@ -133,14 +133,20 @@ def test_hot_standby_gc(neon_env_builder: NeonEnvBuilder, pause_apply: bool):
|
|||||||
tenant_conf = {
|
tenant_conf = {
|
||||||
# set PITR interval to be small, so we can do GC
|
# set PITR interval to be small, so we can do GC
|
||||||
"pitr_interval": "0 s",
|
"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)
|
env = neon_env_builder.init_start(initial_tenant_conf=tenant_conf)
|
||||||
timeline_id = env.initial_timeline
|
timeline_id = env.initial_timeline
|
||||||
tenant_id = env.initial_tenant
|
tenant_id = env.initial_tenant
|
||||||
|
|
||||||
|
# enable the compute feature t
|
||||||
|
compute_features = ['standby_horizon_leases_experimental']
|
||||||
|
|
||||||
with env.endpoints.create_start(
|
with env.endpoints.create_start(
|
||||||
branch_name="main",
|
branch_name="main",
|
||||||
endpoint_id="primary",
|
endpoint_id="primary",
|
||||||
|
features=compute_features,
|
||||||
) as primary:
|
) as primary:
|
||||||
with env.endpoints.new_replica_start(
|
with env.endpoints.new_replica_start(
|
||||||
origin=primary,
|
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
|
# that this test exercises. With protocol version 1 it
|
||||||
# fails.
|
# fails.
|
||||||
config_lines=["neon.protocol_version=2"],
|
config_lines=["neon.protocol_version=2"],
|
||||||
|
features=compute_features,
|
||||||
) as secondary:
|
) as secondary:
|
||||||
p_cur = primary.connect().cursor()
|
p_cur = primary.connect().cursor()
|
||||||
p_cur.execute("CREATE EXTENSION neon_test_utils")
|
p_cur.execute("CREATE EXTENSION neon_test_utils")
|
||||||
|
|||||||
Reference in New Issue
Block a user