Skip to content

Commit 98eb074

Browse files
committed
Using the HEARTBEAT as the delete pipeline observation period.
1 parent 6986bec commit 98eb074

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

quickwit/quickwit-actors/src/actor.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -408,9 +408,7 @@ impl<A: Actor> ActorContext<A> {
408408

409409
pub(crate) fn observe(&self, actor: &mut A) -> A::ObservableState {
410410
let obs_state = actor.observable_state();
411-
let _ = self
412-
.observable_state_tx
413-
.send(obs_state.clone());
411+
let _ = self.observable_state_tx.send(obs_state.clone());
414412
obs_state
415413
}
416414

quickwit/quickwit-common/src/net.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,6 @@ impl Display for HostAddr {
210210
/// Finds a random available TCP port.
211211
///
212212
/// This function induces a race condition, use it only in unit tests.
213-
#[cfg(any(test, feature = "testsuite"))]
214213
pub fn find_available_tcp_port() -> anyhow::Result<u16> {
215214
let socket: SocketAddr = ([127, 0, 0, 1], 0u16).into();
216215
let listener = TcpListener::bind(socket)?;

quickwit/quickwit-janitor/src/actors/delete_task_pipeline.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919

2020
use std::path::PathBuf;
2121
use std::sync::Arc;
22-
use std::time::Duration;
2322

2423
use async_trait::async_trait;
2524
use quickwit_actors::{
2625
Actor, ActorContext, ActorExitStatus, ActorHandle, Handler, Supervisor, SupervisorState,
26+
HEARTBEAT,
2727
};
2828
use quickwit_common::io::IoControls;
2929
use quickwit_common::KillSwitch;
@@ -265,7 +265,7 @@ impl Handler<Observe> for DeleteTaskPipeline {
265265
}
266266
}
267267
// Supervisors supervise every `HEARTBEAT`. We can wait a bit more to observe supervisors.
268-
ctx.schedule_self_msg(Duration::from_secs(5), Observe).await;
268+
ctx.schedule_self_msg(HEARTBEAT, Observe).await;
269269
Ok(())
270270
}
271271
}

0 commit comments

Comments
 (0)