fix: Actually switch into rpc_write mode in querier
Only when the feature flag is set *and* --ingester-addresses is set. I had documented that intention, but didn't actually implement it correctly.pull/24376/head
parent
44c3486db0
commit
fdbf9e112e
|
@ -4,7 +4,9 @@ use crate::process_info::setup_metric_registry;
|
|||
|
||||
use super::main;
|
||||
use clap_blocks::{
|
||||
catalog_dsn::CatalogDsnConfig, object_store::make_object_store, querier::QuerierConfig,
|
||||
catalog_dsn::CatalogDsnConfig,
|
||||
object_store::make_object_store,
|
||||
querier::{IngesterAddresses, QuerierConfig},
|
||||
run_config::RunConfig,
|
||||
};
|
||||
use iox_query::exec::Executor;
|
||||
|
@ -96,13 +98,14 @@ pub async fn command(config: Config) -> Result<(), Error> {
|
|||
let num_threads = num_query_threads.unwrap_or_else(num_cpus::get);
|
||||
info!(%num_threads, "using specified number of threads per thread pool");
|
||||
|
||||
if config.querier_config.rpc_write() {
|
||||
let ingester_addresses = config.querier_config.ingester_addresses()?;
|
||||
if config.querier_config.rpc_write() && matches!(ingester_addresses, IngesterAddresses::List(_))
|
||||
{
|
||||
info!("using the RPC write path");
|
||||
} else {
|
||||
info!("using the write buffer path");
|
||||
}
|
||||
|
||||
let ingester_addresses = config.querier_config.ingester_addresses()?;
|
||||
info!(?ingester_addresses, "using ingester addresses");
|
||||
|
||||
let exec = Arc::new(Executor::new(
|
||||
|
|
|
@ -186,6 +186,9 @@ pub async fn create_querier_server_type(
|
|||
);
|
||||
assert!(existing.is_none());
|
||||
|
||||
let rpc_write = args.querier_config.rpc_write()
|
||||
&& matches!(args.ingester_addresses, IngesterAddresses::List(_));
|
||||
|
||||
let ingester_connection = match args.ingester_addresses {
|
||||
IngesterAddresses::None => None,
|
||||
IngesterAddresses::ByShardIndex(map) => Some(create_ingester_connections(
|
||||
|
@ -209,7 +212,7 @@ pub async fn create_querier_server_type(
|
|||
args.exec,
|
||||
ingester_connection,
|
||||
args.querier_config.max_concurrent_queries(),
|
||||
args.querier_config.rpc_write(),
|
||||
rpc_write,
|
||||
)
|
||||
.await?,
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue