From 7ecdb71642eeac15e5dfb0ed3ae13385b5f767f9 Mon Sep 17 00:00:00 2001 From: Gaius Date: Mon, 28 Oct 2024 15:56:37 +0800 Subject: [PATCH] fix: shutdown repeatedly during gc (#806) Signed-off-by: Gaius --- Cargo.lock | 16 ++++++++-------- Cargo.toml | 16 ++++++++-------- dragonfly-client/src/announcer/mod.rs | 1 + dragonfly-client/src/gc/mod.rs | 1 + dragonfly-client/src/health/mod.rs | 1 + dragonfly-client/src/metrics/mod.rs | 1 + dragonfly-client/src/stats/mod.rs | 1 + 7 files changed, 21 insertions(+), 16 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3fd11c93..188af230 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -856,7 +856,7 @@ dependencies = [ [[package]] name = "dragonfly-client" -version = "0.1.114" +version = "0.1.115" dependencies = [ "anyhow", "blake3", @@ -928,7 +928,7 @@ dependencies = [ [[package]] name = "dragonfly-client-backend" -version = "0.1.114" +version = "0.1.115" dependencies = [ "dragonfly-api", "dragonfly-client-core", @@ -956,7 +956,7 @@ dependencies = [ [[package]] name = "dragonfly-client-config" -version = "0.1.114" +version = "0.1.115" dependencies = [ "bytesize", "bytesize-serde", @@ -982,7 +982,7 @@ dependencies = [ [[package]] name = "dragonfly-client-core" -version = "0.1.114" +version = "0.1.115" dependencies = [ "headers 0.4.0", "hyper 1.4.1", @@ -1000,7 +1000,7 @@ dependencies = [ [[package]] name = "dragonfly-client-init" -version = "0.1.114" +version = "0.1.115" dependencies = [ "anyhow", "clap", @@ -1016,7 +1016,7 @@ dependencies = [ [[package]] name = "dragonfly-client-storage" -version = "0.1.114" +version = "0.1.115" dependencies = [ "base16ct", "bincode", @@ -1041,7 +1041,7 @@ dependencies = [ [[package]] name = "dragonfly-client-util" -version = "0.1.114" +version = "0.1.115" dependencies = [ "base16ct", "base64 0.22.1", @@ -1393,7 +1393,7 @@ dependencies = [ [[package]] name = "hdfs" -version = "0.1.114" +version = "0.1.115" dependencies = [ "dragonfly-client-backend", "dragonfly-client-core", diff --git a/Cargo.toml b/Cargo.toml index 9268d3ba..c0edef73 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ members = [ ] [workspace.package] -version = "0.1.114" +version = "0.1.115" authors = ["The Dragonfly Developers"] homepage = "https://d7y.io/" repository = "https://github.com/dragonflyoss/client.git" @@ -22,13 +22,13 @@ readme = "README.md" edition = "2021" [workspace.dependencies] -dragonfly-client = { path = "dragonfly-client", version = "0.1.114" } -dragonfly-client-core = { path = "dragonfly-client-core", version = "0.1.114" } -dragonfly-client-config = { path = "dragonfly-client-config", version = "0.1.114" } -dragonfly-client-storage = { path = "dragonfly-client-storage", version = "0.1.114" } -dragonfly-client-backend = { path = "dragonfly-client-backend", version = "0.1.114" } -dragonfly-client-util = { path = "dragonfly-client-util", version = "0.1.114" } -dragonfly-client-init = { path = "dragonfly-client-init", version = "0.1.114" } +dragonfly-client = { path = "dragonfly-client", version = "0.1.115" } +dragonfly-client-core = { path = "dragonfly-client-core", version = "0.1.115" } +dragonfly-client-config = { path = "dragonfly-client-config", version = "0.1.115" } +dragonfly-client-storage = { path = "dragonfly-client-storage", version = "0.1.115" } +dragonfly-client-backend = { path = "dragonfly-client-backend", version = "0.1.115" } +dragonfly-client-util = { path = "dragonfly-client-util", version = "0.1.115" } +dragonfly-client-init = { path = "dragonfly-client-init", version = "0.1.115" } thiserror = "1.0" dragonfly-api = "=2.0.167" reqwest = { version = "0.12.4", features = ["stream", "native-tls", "default-tls", "rustls-tls"] } diff --git a/dragonfly-client/src/announcer/mod.rs b/dragonfly-client/src/announcer/mod.rs index 0188b00f..b83e790f 100644 --- a/dragonfly-client/src/announcer/mod.rs +++ b/dragonfly-client/src/announcer/mod.rs @@ -187,6 +187,7 @@ impl SchedulerAnnouncer { } info!("announce to scheduler shutting down"); + return } } } diff --git a/dragonfly-client/src/gc/mod.rs b/dragonfly-client/src/gc/mod.rs index 76230997..15e82d47 100644 --- a/dragonfly-client/src/gc/mod.rs +++ b/dragonfly-client/src/gc/mod.rs @@ -103,6 +103,7 @@ impl GC { _ = shutdown.recv() => { // Shutdown the garbage collector. info!("garbage collector shutting down"); + return } } } diff --git a/dragonfly-client/src/health/mod.rs b/dragonfly-client/src/health/mod.rs index f03eb7a7..5a176d33 100644 --- a/dragonfly-client/src/health/mod.rs +++ b/dragonfly-client/src/health/mod.rs @@ -71,6 +71,7 @@ impl Health { _ = shutdown.recv() => { // Health server shutting down with signals. info!("health server shutting down"); + return } } } diff --git a/dragonfly-client/src/metrics/mod.rs b/dragonfly-client/src/metrics/mod.rs index a7521977..50a49ac9 100644 --- a/dragonfly-client/src/metrics/mod.rs +++ b/dragonfly-client/src/metrics/mod.rs @@ -674,6 +674,7 @@ impl Metrics { _ = shutdown.recv() => { // Metrics server shutting down with signals. info!("metrics server shutting down"); + return } } } diff --git a/dragonfly-client/src/stats/mod.rs b/dragonfly-client/src/stats/mod.rs index 0960d11e..189c05ce 100644 --- a/dragonfly-client/src/stats/mod.rs +++ b/dragonfly-client/src/stats/mod.rs @@ -110,6 +110,7 @@ impl Stats { _ = shutdown.recv() => { // Stats server shutting down with signals. info!("stats server shutting down"); + return } } }