From f52155d0c2b8669fffc8baeed7829137cb8fc8fd Mon Sep 17 00:00:00 2001 From: Alex Chi Z Date: Wed, 23 Jul 2025 16:37:06 -0400 Subject: [PATCH] ignore warnings cancel Signed-off-by: Alex Chi Z --- pageserver/src/pgdatadir_mapping.rs | 12 ++++++++++++ test_runner/regress/test_pg_regress.py | 12 ++++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/pageserver/src/pgdatadir_mapping.rs b/pageserver/src/pgdatadir_mapping.rs index cedf77fb37..fd54b3e31f 100644 --- a/pageserver/src/pgdatadir_mapping.rs +++ b/pageserver/src/pgdatadir_mapping.rs @@ -723,6 +723,9 @@ impl Timeline { v2_exists ); } + Err(e) if e.is_cancel() => { + // Cancellation errors are fine to ignore, do not log. + } Err(e) => { tracing::warn!("failed to get rel exists in v2: {e}"); } @@ -863,6 +866,9 @@ impl Timeline { rels_v2.len() ); } + Err(e) if e.is_cancel() => { + // Cancellation errors are fine to ignore, do not log. + } Err(e) => { tracing::warn!("failed to list rels in v2: {e}"); } @@ -2600,6 +2606,12 @@ impl DatadirModification<'_> { ); } } + Err(WalIngestError { + kind: WalIngestErrorKind::Cancelled, + .. + }) => { + // Cancellation errors are fine to ignore, do not log. + } Err(e) => { tracing::warn!("error dropping rels: {}", e); } diff --git a/test_runner/regress/test_pg_regress.py b/test_runner/regress/test_pg_regress.py index cc7f736239..374514b9bd 100644 --- a/test_runner/regress/test_pg_regress.py +++ b/test_runner/regress/test_pg_regress.py @@ -123,9 +123,9 @@ def post_checks(env: NeonEnv, test_output_dir: Path, db_name: str, endpoint: End def patch_tenant_conf(tenant_conf: dict[str, Any], reldir_type: str) -> dict[str, Any]: tenant_conf = tenant_conf.copy() if reldir_type == "v2": - tenant_conf["rel_size_v2_enabled"] = "true" + tenant_conf["rel_size_v2_enabled"] = True else: - tenant_conf["rel_size_v2_enabled"] = "false" + tenant_conf["rel_size_v2_enabled"] = False return tenant_conf @@ -440,6 +440,14 @@ def test_tx_abort_with_many_relations( ], ) + if reldir_type == "v2": + # v2-only mode instead of v1-v2 validation mode + env.pageserver.http_client().timeline_patch_index_part( + env.initial_tenant, + env.initial_timeline, + {"rel_size_migration": "migrated"}, + ) + # How many relations: this number is tuned to be long enough to take tens of seconds # if the rollback code path is buggy, tripping the test's timeout. n = 5000