diff --git a/distribution/lambda/cdk/stacks/examples/hdfs_stack.py b/distribution/lambda/cdk/stacks/examples/hdfs_stack.py index db3c63e9413..5e1d7350a99 100644 --- a/distribution/lambda/cdk/stacks/examples/hdfs_stack.py +++ b/distribution/lambda/cdk/stacks/examples/hdfs_stack.py @@ -51,6 +51,7 @@ def __init__( searcher_memory_size=searcher_memory_size, indexer_package_location=indexer_package_location, searcher_package_location=searcher_package_location, + indexer_timeout=aws_cdk.Duration.minutes(10), ) aws_cdk.CfnOutput( diff --git a/distribution/lambda/cdk/stacks/services/indexer_service.py b/distribution/lambda/cdk/stacks/services/indexer_service.py index 65a32ffb8a6..56ce7be5def 100644 --- a/distribution/lambda/cdk/stacks/services/indexer_service.py +++ b/distribution/lambda/cdk/stacks/services/indexer_service.py @@ -13,6 +13,7 @@ def __init__( index_config_bucket: str, index_config_key: str, memory_size: int, + timeout: aws_cdk.Duration, environment: dict[str, str], asset_path: str, **kwargs, @@ -32,8 +33,7 @@ def __init__( "QW_LAMBDA_INDEX_CONFIG_URI": f"s3://{index_config_bucket}/{index_config_key}", **environment, }, - # use a strict timeout and retry policy to avoid unexpected costs - timeout=aws_cdk.Duration.minutes(1), + timeout=timeout, retry_attempts=0, reserved_concurrent_executions=1, memory_size=memory_size, diff --git a/distribution/lambda/cdk/stacks/services/quickwit_service.py b/distribution/lambda/cdk/stacks/services/quickwit_service.py index d0505b63faf..66294ec239b 100644 --- a/distribution/lambda/cdk/stacks/services/quickwit_service.py +++ b/distribution/lambda/cdk/stacks/services/quickwit_service.py @@ -32,6 +32,8 @@ def __init__( indexer_package_location: str, indexer_memory_size: int = DEFAULT_LAMBDA_MEMORY_SIZE, indexer_environment: dict[str, str] = {}, + # small default timeout to avoid unexpected costs and hanging indexers + indexer_timeout: aws_cdk.Duration = aws_cdk.Duration.minutes(1), searcher_memory_size: int = DEFAULT_LAMBDA_MEMORY_SIZE, searcher_environment: dict[str, str] = {}, **kwargs, @@ -55,6 +57,7 @@ def __init__( index_config_bucket=index_config_bucket, index_config_key=index_config_key, memory_size=indexer_memory_size, + timeout=indexer_timeout, environment=indexer_environment, asset_path=indexer_package_location, ) diff --git a/quickwit/quickwit-lambda/src/searcher/api.rs b/quickwit/quickwit-lambda/src/searcher/api.rs index b7b3150e7bd..44c73d54c12 100644 --- a/quickwit/quickwit-lambda/src/searcher/api.rs +++ b/quickwit/quickwit-lambda/src/searcher/api.rs @@ -48,6 +48,7 @@ async fn create_local_search_service( let searcher_pool = SearcherPool::default(); let search_job_placer = SearchJobPlacer::new(searcher_pool.clone()); let cluster_client = ClusterClient::new(search_job_placer); + // TODO configure split cache let searcher_context = Arc::new(SearcherContext::new(searcher_config, None)); let search_service = Arc::new(SearchServiceImpl::new( metastore,