diff --git a/pageserver/src/metrics.rs b/pageserver/src/metrics.rs index 3076c7f1d6..0ff31dcb8a 100644 --- a/pageserver/src/metrics.rs +++ b/pageserver/src/metrics.rs @@ -2234,8 +2234,10 @@ impl BasebackupQueryTimeOngoingRecording<'_> { // If you want to change categorize of a specific error, also change it in `log_query_error`. let metric = match res { Ok(_) => &self.parent.ok, - Err(QueryError::Shutdown) => { - // Do not observe ok/err for shutdown + Err(QueryError::Shutdown) | Err(QueryError::Reconnect) => { + // Do not observe ok/err for shutdown/reconnect. + // Reconnect error might be raised when the operation is waiting for LSN and the tenant shutdown interrupts + // the operation. A reconnect error will be issued and the client will retry. return; } Err(QueryError::Disconnected(ConnectionError::Io(io_error)))