Browse Source

Set isHeartbeating to true at startup matching Go's VolumeServer init

Go unconditionally sets isHeartbeating: true in the VolumeServer
struct literal. Rust was starting with false when masters are
configured, causing /healthz to return 503 until the first
heartbeat succeeds.
rust-volume-server
Chris Lu 2 days ago
parent
commit
3a74853024
  1. 3
      seaweed-volume/src/main.rs

3
seaweed-volume/src/main.rs

@ -303,7 +303,8 @@ async fn run(
rack: config.rack.clone(),
file_size_limit_bytes: config.file_size_limit_bytes,
maintenance_byte_per_second: config.maintenance_byte_per_second,
is_heartbeating: std::sync::atomic::AtomicBool::new(config.masters.is_empty()),
// Go sets isHeartbeating: true unconditionally at startup
is_heartbeating: std::sync::atomic::AtomicBool::new(true),
has_master: !config.masters.is_empty(),
pre_stop_seconds: config.pre_stop_seconds,
volume_state_notify: tokio::sync::Notify::new(),

Loading…
Cancel
Save