Skip to content

Commit

Permalink
sqs-polling (#240)
Browse files Browse the repository at this point in the history
Co-authored-by: Aurélien Nicolas <info@nau.re>
  • Loading branch information
naure and Aurélien Nicolas authored Aug 14, 2024
1 parent e82db4a commit a8d2a1b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions iris-mpc/src/bin/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ const SYNC_RESULTS: usize = MAX_BATCH_SIZE * 2;
const SYNC_QUERIES: usize = MAX_BATCH_SIZE * 2;
const_assert!(SYNC_QUERIES <= sync_nccl::MAX_REQUESTS);
const MAX_ROLLBACK: usize = MAX_BATCH_SIZE * 2;
const SQS_POLLING_INTERVAL: Duration = Duration::from_secs(1);

static CURRENT_BATCH_SIZE: LazyLock<Mutex<usize>> = LazyLock::new(|| Mutex::new(MAX_BATCH_SIZE));

Expand Down Expand Up @@ -174,6 +175,8 @@ async fn receive_batch(
batch_query.query_left.code.extend(iris_shares);
batch_query.query_left.mask.extend(mask_shares);
}
} else {
tokio::time::sleep(SQS_POLLING_INTERVAL).await;
}
}
// TODO: also grab the right side from the batch once it is sent, ATM just
Expand Down

0 comments on commit a8d2a1b

Please sign in to comment.