mirror of
https://github.com/postgresml/pgcat.git
synced 2026-03-24 17:56:29 +00:00
Require a reason when marking a server bad (#654)
When calling mark_bad require a reason so it can be logged rather than the generic message
This commit is contained in:
@@ -1279,8 +1279,8 @@ impl Server {
|
||||
}
|
||||
|
||||
/// Indicate that this server connection cannot be re-used and must be discarded.
|
||||
pub fn mark_bad(&mut self) {
|
||||
error!("Server {:?} marked bad", self.address);
|
||||
pub fn mark_bad(&mut self, reason: &str) {
|
||||
error!("Server {:?} marked bad, reason: {}", self.address, reason);
|
||||
self.bad = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user