Skip to content

Commit

Permalink
Test adding and failing of nodes (#456)
Browse files Browse the repository at this point in the history
Adding back of heart beat for testing
  • Loading branch information
danielle-tfh authored Sep 26, 2024
1 parent b2eee77 commit 8769553
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion iris-mpc-gpu/src/server/heartbeat_nccl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use tokio::{
task::{spawn_blocking, JoinHandle},
time::timeout,
};
const HEARBEAT_INTERVAL: Duration = Duration::from_secs(60);
const HEARBEAT_INTERVAL: Duration = Duration::from_secs(30);

pub async fn start_heartbeat(
party_id: usize,
Expand Down
19 changes: 9 additions & 10 deletions iris-mpc/src/bin/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ use iris_mpc_common::{
use iris_mpc_gpu::{
helpers::device_manager::DeviceManager,
server::{
get_dummy_shares_for_deletion, sync_nccl, BatchMetadata, BatchQuery, ServerActor,
ServerJobResult,
get_dummy_shares_for_deletion, heartbeat_nccl::start_heartbeat, sync_nccl, BatchMetadata,
BatchQuery, ServerActor, ServerJobResult,
},
};
use iris_mpc_store::{Store, StoredIrisRef};
Expand Down Expand Up @@ -589,14 +589,13 @@ async fn server_main(config: Config) -> eyre::Result<()> {
let mut background_tasks = TaskMonitor::new();

// DEBUG: disable heartbeat
// let (tx, rx) = oneshot::channel();
// let _heartbeat = background_tasks.spawn(start_heartbeat(config.party_id,
// tx));

// background_tasks.check_tasks();
// tracing::info!("Heartbeat starting...");
// rx.await??;
// tracing::info!("Heartbeat started.");
let (tx, rx) = oneshot::channel();
let _heartbeat = background_tasks.spawn(start_heartbeat(config.party_id, tx));

background_tasks.check_tasks();
tracing::info!("Heartbeat starting...");
rx.await??;
tracing::info!("Heartbeat started.");

// Start the actor in separate task.
// A bit convoluted, but we need to create the actor on the thread already,
Expand Down

0 comments on commit 8769553

Please sign in to comment.