Skip to content

Commit

Permalink
Add env to disable control plane check for searcher.
Browse files Browse the repository at this point in the history
  • Loading branch information
fmassot committed Aug 28, 2024
1 parent 60368df commit 9127acf
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion quickwit/quickwit-serve/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ const READINESS_REPORTING_INTERVAL: Duration = if cfg!(any(test, feature = "test
const METASTORE_CLIENT_MAX_CONCURRENCY_ENV_KEY: &str = "QW_METASTORE_CLIENT_MAX_CONCURRENCY";
const DEFAULT_METASTORE_CLIENT_MAX_CONCURRENCY: usize = 6;
const DISABLE_DELETE_TASK_SERVICE_ENV_KEY: &str = "QW_DISABLE_DELETE_TASK_SERVICE";
const DISABLE_CONTROL_PLANE_CHECK_FOR_SEARCHER_ENV_KEY: &str =
"QW_DISABLE_CONTROL_PLANE_CHECK_FOR_SEARCHER";

pub type EnvFilterReloadFn = Arc<dyn Fn(&str) -> anyhow::Result<()> + Send + Sync>;

Expand Down Expand Up @@ -338,7 +340,12 @@ async fn start_control_plane_if_needed(
balance_channel_for_service(cluster, QuickwitService::ControlPlane).await;

// If the node is a metastore, we skip this check in order to avoid a deadlock.
if !node_config.is_service_enabled(QuickwitService::Metastore) {
// If the node is a searcher and the control plane check is disabled for searcher, we skip
// this check.
if !(node_config.is_service_enabled(QuickwitService::Metastore)
|| (node_config.is_service_enabled(QuickwitService::Searcher)
&& get_bool_from_env(DISABLE_CONTROL_PLANE_CHECK_FOR_SEARCHER_ENV_KEY, false)))
{
info!("connecting to control plane");

if !balance_channel
Expand Down

0 comments on commit 9127acf

Please sign in to comment.