From 87d7ce816d784c4ae721b59e793f69293c080d6a Mon Sep 17 00:00:00 2001 From: Konstantin Knizhnik Date: Thu, 20 May 2021 17:40:02 +0300 Subject: [PATCH] Add pause in pageserver stop method to avoid address already in use errors --- control_plane/src/storage.rs | 2 +- vendor/postgres | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/control_plane/src/storage.rs b/control_plane/src/storage.rs index ff85e67e80..276d629826 100644 --- a/control_plane/src/storage.rs +++ b/control_plane/src/storage.rs @@ -130,11 +130,11 @@ impl PageServerNode { // wait for pageserver stop for _ in 0..5 { let stream = TcpStream::connect(self.address()); + thread::sleep(Duration::from_secs(1)); if let Err(_e) = stream { return Ok(()); } println!("Stopping pageserver on {}", self.address()); - thread::sleep(Duration::from_secs(1)); } bail!("Failed to stop pageserver with pid {}", pid); diff --git a/vendor/postgres b/vendor/postgres index 3705405983..1966175a95 160000 --- a/vendor/postgres +++ b/vendor/postgres @@ -1 +1 @@ -Subproject commit 370540598383a14ba2d5225be3f5168823f6e511 +Subproject commit 1966175a95593486f1337199daf752cfa48cacb5