diff --git a/pageserver/src/page_service.rs b/pageserver/src/page_service.rs index 6ce716d1d9..74aff21578 100644 --- a/pageserver/src/page_service.rs +++ b/pageserver/src/page_service.rs @@ -867,6 +867,10 @@ impl PageServerHandler { ctx: &RequestContext, ) -> Result { let last_record_lsn = timeline.get_last_record_lsn(); + // Horizon = 0 (INVALID) is treated as LSN interval degenerated to point [lsn,lsn]. + // It as done mostly for convenience (because such get_page commands are widely used in tests) and + // also seems to be logical: Lsn::MAX moves upper boundary of LSN interval till last_record_lsn and + // Lsn(0) moves upper boundary to lower boundary. let request_horizon = if horizon == Lsn::INVALID { lsn } else { diff --git a/test_runner/regress/test_replication_lag.py b/test_runner/regress/test_replication_lag.py index 9a5cdafd63..a1521ee7bc 100644 --- a/test_runner/regress/test_replication_lag.py +++ b/test_runner/regress/test_replication_lag.py @@ -1,5 +1,4 @@ import threading -import time from fixtures.log_helper import log from fixtures.neon_fixtures import NeonEnv, PgBin, wait_replica_caughtup