From d98ac041362d9274832bd82c5a13d3513a54e989 Mon Sep 17 00:00:00 2001 From: Joonas Koivunen Date: Mon, 20 Nov 2023 08:33:17 +0100 Subject: [PATCH] chore(background_tasks): missed allowed_error change, logging change (#5883) - I am always confused by the log for the error wait time, now it will be `2s` or `2.0s` not `2.0` - fix missed string change introduced in #5881 [evidence] [evidence]: https://neon-github-public-dev.s3.amazonaws.com/reports/main/6921062837/index.html#suites/f9eba3cfdb71aa6e2b54f6466222829b/87897fe1ddee3825 --- pageserver/src/tenant/tasks.rs | 12 ++++++------ test_runner/fixtures/neon_fixtures.py | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pageserver/src/tenant/tasks.rs b/pageserver/src/tenant/tasks.rs index e59001297c..27dff9f54a 100644 --- a/pageserver/src/tenant/tasks.rs +++ b/pageserver/src/tenant/tasks.rs @@ -185,11 +185,11 @@ async fn compaction_loop(tenant: Arc, cancel: CancellationToken) { MAX_BACKOFF_SECS, ); error_run_count += 1; + let wait_duration = Duration::from_secs_f64(wait_duration); error!( - "Compaction failed {error_run_count} times, retrying in {:?}: {e:?}", - wait_duration + "Compaction failed {error_run_count} times, retrying in {wait_duration:?}: {e:?}", ); - Duration::from_secs_f64(wait_duration) + wait_duration } else { error_run_count = 0; period @@ -270,11 +270,11 @@ async fn gc_loop(tenant: Arc, cancel: CancellationToken) { MAX_BACKOFF_SECS, ); error_run_count += 1; + let wait_duration = Duration::from_secs_f64(wait_duration); error!( - "Gc failed {error_run_count} times, retrying in {:?}: {e:?}", - wait_duration + "Gc failed {error_run_count} times, retrying in {wait_duration:?}: {e:?}", ); - Duration::from_secs_f64(wait_duration) + wait_duration } else { error_run_count = 0; period diff --git a/test_runner/fixtures/neon_fixtures.py b/test_runner/fixtures/neon_fixtures.py index 6737ca5fe3..4776fbc511 100644 --- a/test_runner/fixtures/neon_fixtures.py +++ b/test_runner/fixtures/neon_fixtures.py @@ -1663,7 +1663,7 @@ class NeonPageserver(PgProtocol): # these can happen anytime we do compactions from background task and shutdown pageserver r".*ERROR.*ancestor timeline \S+ is being stopped", # this is expected given our collaborative shutdown approach for the UploadQueue - ".*Compaction failed.*, retrying in .*: queue is in state Stopped.*", + ".*Compaction failed.*, retrying in .*: Other\\(queue is in state Stopped.*", # Pageserver timeline deletion should be polled until it gets 404, so ignore it globally ".*Error processing HTTP request: NotFound: Timeline .* was not found", ".*took more than expected to complete.*",