Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable control plane check for searcher. #5360

Merged
merged 1 commit into from
Aug 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion quickwit/quickwit-serve/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,10 @@ 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, we skip this check because the searcher does not need to.
if !(node_config.is_service_enabled(QuickwitService::Metastore)
|| node_config.is_service_enabled(QuickwitService::Searcher))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is wrong: unless i'm missing something it's telling "if metastore is disabled AND searcher is disabled", connect to control plane. This means if this node is searcher+indexer, don't connect to the metastore

What we want is if !(is_service_enabled(Metastore) OR enabled_services.filter(service != Searcher).is_empty)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @trinity-1686a . (except I believe the expression can simply be

enabled_services.filter(service != Searcher).is_empty() (as it includes the metastore)

{
info!("connecting to control plane");

if !balance_channel
Expand Down
Loading