From 6dca7c6b2821483c3890f55cb7f48a39bb77d93d Mon Sep 17 00:00:00 2001 From: Christian Schwarz Date: Sat, 23 Mar 2024 13:57:06 +0000 Subject: [PATCH] audit code base for failpoints that should be `pausable_failpoint!` Methodology: 1. search for `"pause"` and fix as appropriate 2. search for `=pause` => no further fixes found Future work: audit all uses of fail::fail_point! / auto-convert them all to use pausable_failpoint! (or implement our own failpoints library) --- pageserver/src/control_plane_client.rs | 2 +- pageserver/src/tenant.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pageserver/src/control_plane_client.rs b/pageserver/src/control_plane_client.rs index 42c800822b08..76aaef377fc9 100644 --- a/pageserver/src/control_plane_client.rs +++ b/pageserver/src/control_plane_client.rs @@ -210,7 +210,7 @@ impl ControlPlaneGenerationsApi for ControlPlaneClient { .collect(), }; - fail::fail_point!("control-plane-client-validate"); + crate::tenant::pausable_failpoint!("control-plane-client-validate"); let response: ValidateResponse = self.retry_http_forever(&re_attach_path, request).await?; diff --git a/pageserver/src/tenant.rs b/pageserver/src/tenant.rs index 1b9c79f59fe7..7bd85b6fd565 100644 --- a/pageserver/src/tenant.rs +++ b/pageserver/src/tenant.rs @@ -144,6 +144,7 @@ macro_rules! pausable_failpoint { } }; } +pub(crate) use pausable_failpoint; pub mod blob_io; pub mod block_io;