Skip to content

Commit a3de045

Browse files
committed
Address review comments
1 parent 6b65413 commit a3de045

File tree

7 files changed

+537
-522
lines changed

7 files changed

+537
-522
lines changed

distribution/lambda/poetry.lock

Lines changed: 525 additions & 515 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

distribution/lambda/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ packages = [{include = "cdk"}]
1010
[tool.poetry.dependencies]
1111
python = ">=3.10,<4.0"
1212
aws-cdk-lib = "^2.95.1"
13-
cargo-lambda = "^0.21.0"
13+
cargo-lambda = "^1.1.0"
1414
constructs = ">=10.0.0,<11.0.0"
1515
pyyaml = "^6.0.1"
1616
black = "^24.3.0"

quickwit/quickwit-lambda/src/environment.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ use once_cell::sync::Lazy;
2424
pub static INDEX_ID: Lazy<String> =
2525
Lazy::new(|| var("QW_LAMBDA_INDEX_ID").expect("QW_LAMBDA_INDEX_ID must be set"));
2626

27+
/// Configure the fmt tracing subscriber to log span boundaries. This is very verbose and is
28+
/// only used to generate advanced KPIs from Lambda runs (e.g for blogpost benchmarks)
2729
pub static LOG_SPAN_BOUNDARIES: Lazy<bool> =
2830
Lazy::new(|| var("QW_LAMBDA_LOG_SPAN_BOUNDARIES").is_ok_and(|v| v.as_str() == "true"));
2931

quickwit/quickwit-lambda/src/indexer/ingest/helpers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ pub(super) async fn spawn_services(
241241
SearchJobPlacer::default(),
242242
storage_resolver,
243243
event_broker,
244-
true,
244+
false,
245245
)
246246
.await?,
247247
)

quickwit/quickwit-lambda/src/indexer/ingest/mod.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ use quickwit_index_management::clear_cache_directory;
3737
use quickwit_indexing::models::IndexingStatistics;
3838
use tracing::{debug, info};
3939

40-
use crate::indexer::environment::CONFIGURATION_TEMPLATE;
40+
use crate::indexer::environment::{CONFIGURATION_TEMPLATE, DISABLE_JANITOR};
4141
use crate::indexer::ingest::helpers::wait_for_merges;
4242
use crate::utils::load_node_config;
4343

@@ -69,8 +69,11 @@ pub async fn ingest(args: IngestArgs) -> anyhow::Result<IndexingStatistics> {
6969
)
7070
.await?;
7171

72-
let services = [QuickwitService::Indexer, QuickwitService::Janitor];
73-
let cluster = create_empty_cluster(&config, &services).await?;
72+
let mut services = vec![QuickwitService::Indexer];
73+
if !*DISABLE_JANITOR {
74+
services.push(QuickwitService::Janitor);
75+
}
76+
let cluster = create_empty_cluster(&config, &services[..]).await?;
7477
let universe = Universe::new();
7578
let runtimes_config = RuntimesConfig::default();
7679

quickwit/quickwit-lambda/src/searcher/handler.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ use quickwit_search::SearchResponseRest;
2626
use quickwit_serve::SearchRequestQueryString;
2727
use tracing::{debug_span, error, info_span, instrument, Instrument};
2828

29-
use super::environment::DISABLE_SEARCH_CACHE;
3029
use super::search::{search, SearchArgs};
3130
use crate::environment::INDEX_ID;
3231
use crate::logger;
32+
use crate::searcher::environment::DISABLE_SEARCH_CACHE;
3333
use crate::utils::LambdaContainerContext;
3434

3535
#[instrument(skip_all)]

quickwit/quickwit-lambda/src/searcher/search.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ use quickwit_telemetry::payload::{QuickwitFeature, QuickwitTelemetryInfo, Teleme
3535
use tokio::sync::OnceCell;
3636
use tracing::debug;
3737

38-
use super::environment::{CONFIGURATION_TEMPLATE, DISABLE_SEARCH_CACHE};
3938
use crate::environment::INDEX_ID;
39+
use crate::searcher::environment::{CONFIGURATION_TEMPLATE, DISABLE_SEARCH_CACHE};
4040
use crate::utils::load_node_config;
4141

4242
static LAMBDA_SEARCH_CACHE: OnceCell<LambdaSearchCtx> = OnceCell::const_new();

0 commit comments

Comments
 (0)