From 913cc15c9524e31860fc87f5edd2e99304dba48d Mon Sep 17 00:00:00 2001 From: Paul Masurel Date: Tue, 21 May 2024 15:16:17 +0900 Subject: [PATCH] Removing one task per call layer on control plane. They are useless. The control plane is already an actor. --- quickwit/quickwit-serve/src/lib.rs | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/quickwit/quickwit-serve/src/lib.rs b/quickwit/quickwit-serve/src/lib.rs index c59a870ca43..c7957b6e368 100644 --- a/quickwit/quickwit-serve/src/lib.rs +++ b/quickwit/quickwit-serve/src/lib.rs @@ -331,20 +331,9 @@ async fn start_control_plane_if_needed( .await?; let control_plane_server_opt = Some(control_plane_mailbox.clone()); - - // These layers apply to all the RPCs of the control plane. - let shared_layers = ServiceBuilder::new() - .layer(CP_GRPC_SERVER_METRICS_LAYER.clone()) - .layer(LoadShedLayer::new(100)) - .into_inner(); let control_plane_client = ControlPlaneServiceClient::tower() - .stack_layer(shared_layers) - .stack_create_index_layer(OneTaskPerCallLayer) - .stack_delete_index_layer(OneTaskPerCallLayer) - .stack_add_source_layer(OneTaskPerCallLayer) - .stack_toggle_source_layer(OneTaskPerCallLayer) - .stack_delete_source_layer(OneTaskPerCallLayer) - .stack_get_or_create_open_shards_layer(OneTaskPerCallLayer) + .stack_layer(CP_GRPC_SERVER_METRICS_LAYER.clone()) + .stack_layer(LoadShedLayer::new(100)) .build_from_mailbox(control_plane_mailbox); Ok((control_plane_server_opt, control_plane_client)) } else {