Skip to content

Commit

Permalink
Remove async for sync_with_ingesters and sync_with_all_ingesters (#4400)
Browse files Browse the repository at this point in the history
  • Loading branch information
fulmicoton authored Jan 16, 2024
1 parent 50e6572 commit 1cb5bc2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
10 changes: 3 additions & 7 deletions quickwit/quickwit-control-plane/src/control_plane.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,7 @@ impl Actor for ControlPlane {
self.indexing_scheduler
.schedule_indexing_plan_if_needed(&self.model);

self.ingest_controller
.sync_with_all_ingesters(&self.model)
.await;
self.ingest_controller.sync_with_all_ingesters(&self.model);

ctx.schedule_self_msg(CONTROL_PLAN_LOOP_INTERVAL, ControlPlanLoop)
.await;
Expand Down Expand Up @@ -382,8 +380,7 @@ impl Handler<DeleteIndexRequest> for ControlPlane {
self.model.delete_index(&index_uid);

self.ingest_controller
.sync_with_ingesters(&ingester_needing_resync, &self.model)
.await;
.sync_with_ingesters(&ingester_needing_resync, &self.model);

// TODO: Refine the event. Notify index will have the effect to reload the entire state from
// the metastore. We should update the state of the control plane.
Expand Down Expand Up @@ -499,8 +496,7 @@ impl Handler<DeleteSourceRequest> for ControlPlane {
};

self.ingest_controller
.sync_with_ingesters(&ingester_needing_resync, &self.model)
.await;
.sync_with_ingesters(&ingester_needing_resync, &self.model);

self.model.delete_source(&source_uid);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ impl IngestController {
/// Sends a retain shard request to the given list of ingesters.
///
/// If the request fails, we just log an error.
pub(crate) async fn sync_with_ingesters(
pub(crate) fn sync_with_ingesters(
&self,
ingesters: &BTreeSet<NodeId>,
model: &ControlPlaneModel,
Expand All @@ -122,7 +122,7 @@ impl IngestController {
}
}

pub(crate) async fn sync_with_all_ingesters(&self, model: &ControlPlaneModel) {
pub(crate) fn sync_with_all_ingesters(&self, model: &ControlPlaneModel) {
let ingesters: Vec<NodeId> = self.ingester_pool.keys();
for ingester in ingesters {
self.sync_with_ingester(&ingester, model);
Expand Down

0 comments on commit 1cb5bc2

Please sign in to comment.