From 62ce8e0bdaec7eece58283c84c06430d190de2fa Mon Sep 17 00:00:00 2001 From: ad hoc Date: Mon, 7 Mar 2022 14:53:09 +0100 Subject: [PATCH] chore(http): rename auto batching cli option --- meilisearch-http/src/lib.rs | 2 +- meilisearch-lib/src/options.rs | 2 +- meilisearch-lib/src/tasks/scheduler.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/meilisearch-http/src/lib.rs b/meilisearch-http/src/lib.rs index 71932dd9b..d1f5d9da1 100644 --- a/meilisearch-http/src/lib.rs +++ b/meilisearch-http/src/lib.rs @@ -32,7 +32,7 @@ pub fn setup_meilisearch(opt: &Opt) -> anyhow::Result { // enable autobatching? let _ = AUTOBATCHING_ENABLED.store( - opt.scheduler_options.enable_autobatching, + opt.scheduler_options.enable_auto_batching, std::sync::atomic::Ordering::Relaxed, ); diff --git a/meilisearch-lib/src/options.rs b/meilisearch-lib/src/options.rs index d6657cae6..54a411250 100644 --- a/meilisearch-lib/src/options.rs +++ b/meilisearch-lib/src/options.rs @@ -48,7 +48,7 @@ pub struct IndexerOpts { pub struct SchedulerConfig { /// enable the autobatching experimental feature #[clap(long, hide = true)] - pub enable_autobatching: bool, + pub enable_auto_batching: bool, // The maximum number of updates of the same type that can be batched together. // If unspecified, this is unlimited. A value of 0 is interpreted as 1. diff --git a/meilisearch-lib/src/tasks/scheduler.rs b/meilisearch-lib/src/tasks/scheduler.rs index 50f40a8e2..0e540a646 100644 --- a/meilisearch-lib/src/tasks/scheduler.rs +++ b/meilisearch-lib/src/tasks/scheduler.rs @@ -218,7 +218,7 @@ impl Scheduler { let debounce_time = config.debounce_duration_sec; // Disable autobatching - if !config.enable_autobatching { + if !config.enable_auto_batching { config.max_batch_size = Some(1); }