From 9aed7021abe9bda4c2a1943d22a7fd3fba67bb79 Mon Sep 17 00:00:00 2001 From: Remi Dettai Date: Fri, 3 Jul 2026 16:14:52 +0200 Subject: [PATCH] Remove secondary search queue --- .../quickwit-config/src/node_config/mod.rs | 14 ------ .../src/node_config/serialize.rs | 7 --- quickwit/quickwit-search/src/fetch_docs.rs | 1 - quickwit/quickwit-search/src/leaf.rs | 31 +++--------- quickwit/quickwit-search/src/list_fields.rs | 9 +--- quickwit/quickwit-search/src/list_terms.rs | 4 +- quickwit/quickwit-search/src/metrics.rs | 48 +++++-------------- .../quickwit-search/src/metrics_trackers.rs | 8 +--- quickwit/quickwit-search/src/service.rs | 27 +---------- quickwit/quickwit-search/src/tests.rs | 1 - .../quickwit-storage/src/split_cache/mod.rs | 31 ++++-------- .../src/split_cache/split_table.rs | 12 ++--- 12 files changed, 39 insertions(+), 154 deletions(-) diff --git a/quickwit/quickwit-config/src/node_config/mod.rs b/quickwit/quickwit-config/src/node_config/mod.rs index 0d70d0a2b77..f14752574a8 100644 --- a/quickwit/quickwit-config/src/node_config/mod.rs +++ b/quickwit/quickwit-config/src/node_config/mod.rs @@ -293,12 +293,6 @@ pub struct SearcherConfig { pub storage_timeout_policy: Option, pub warmup_memory_budget: ByteSize, pub warmup_single_split_initial_allocation: ByteSize, - - pub secondary_max_num_concurrent_split_searches: usize, - pub secondary_warmup_memory_budget: ByteSize, - pub secondary_targeted_split_count_threshold: Option, - #[serde(default = "SearcherConfig::default_request_timeout_secs")] - secondary_request_timeout_secs: NonZeroU64, } /// Configuration controlling how fast a searcher should timeout a `get_slice` @@ -351,11 +345,6 @@ impl Default for SearcherConfig { storage_timeout_policy: None, warmup_memory_budget: ByteSize::gb(100), warmup_single_split_initial_allocation: ByteSize::gb(1), - - secondary_max_num_concurrent_split_searches: 50, - secondary_warmup_memory_budget: ByteSize::gb(50), - secondary_targeted_split_count_threshold: None, - secondary_request_timeout_secs: Self::default_request_timeout_secs(), } } } @@ -365,9 +354,6 @@ impl SearcherConfig { pub fn request_timeout(&self) -> Duration { Duration::from_secs(self.request_timeout_secs.get()) } - pub fn secondary_request_timeout(&self) -> Duration { - Duration::from_secs(self.secondary_request_timeout_secs.get()) - } fn default_request_timeout_secs() -> NonZeroU64 { NonZeroU64::new(30).unwrap() } diff --git a/quickwit/quickwit-config/src/node_config/serialize.rs b/quickwit/quickwit-config/src/node_config/serialize.rs index 52810ee7a9d..1acd648729e 100644 --- a/quickwit/quickwit-config/src/node_config/serialize.rs +++ b/quickwit/quickwit-config/src/node_config/serialize.rs @@ -677,13 +677,6 @@ mod tests { }), warmup_memory_budget: ByteSize::gb(100), warmup_single_split_initial_allocation: ByteSize::gb(1), - - secondary_max_num_concurrent_split_searches: 50, - secondary_warmup_memory_budget: ByteSize::gb(50), - // Splits per leaf search above which the secondary queue is used. If not set, the - // secondary queue is never used. - secondary_targeted_split_count_threshold: None, - secondary_request_timeout_secs: NonZeroU64::new(30).unwrap(), } ); assert_eq!( diff --git a/quickwit/quickwit-search/src/fetch_docs.rs b/quickwit/quickwit-search/src/fetch_docs.rs index 47552473fcc..9d225113249 100644 --- a/quickwit/quickwit-search/src/fetch_docs.rs +++ b/quickwit/quickwit-search/src/fetch_docs.rs @@ -175,7 +175,6 @@ async fn fetch_docs_in_split( split, Some(doc_mapper.tokenizer_manager()), None, - false, ) .await .context("open-index-for-split")?; diff --git a/quickwit/quickwit-search/src/leaf.rs b/quickwit/quickwit-search/src/leaf.rs index e1d5ac84d38..f184375438e 100644 --- a/quickwit/quickwit-search/src/leaf.rs +++ b/quickwit/quickwit-search/src/leaf.rs @@ -50,7 +50,7 @@ use tokio::task::{JoinError, JoinSet}; use tracing::*; use crate::collector::{IncrementalCollector, make_collector_for_split, make_merge_collector}; -use crate::metrics::{SplitSearchOutcomeCounters, queue_label}; +use crate::metrics::SplitSearchOutcomeCounters; use crate::root::is_metadata_count_request_with_ast; use crate::search_permit_provider::{SearchPermit, compute_initial_memory_allocation}; use crate::service::{SearcherContext, deserialize_doc_mapper}; @@ -98,7 +98,6 @@ pub(crate) async fn open_split_bundle( searcher_context: &SearcherContext, index_storage: Arc, split_and_footer_offsets: &SplitIdAndFooterOffsets, - split_cache_read_only: bool, ) -> anyhow::Result<(FileSlice, BundleStorage)> { let split_file = PathBuf::from(format!("{}.split", split_and_footer_offsets.split_id)); let footer_data = get_split_footer_from_cache_or_fetch( @@ -112,11 +111,7 @@ pub(crate) async fn open_split_bundle( // This is before the bundle storage: at this point, this storage is reading `.split` files. let index_storage_with_split_cache = if let Some(split_cache) = searcher_context.split_cache_opt.as_ref() { - SplitCache::wrap_storage( - split_cache.clone(), - index_storage.clone(), - split_cache_read_only, - ) + SplitCache::wrap_storage(split_cache.clone(), index_storage.clone()) } else { index_storage.clone() }; @@ -159,7 +154,6 @@ pub(crate) async fn open_index_with_caches( split_and_footer_offsets: &SplitIdAndFooterOffsets, tokenizer_manager: Option<&TokenizerManager>, ephemeral_unbounded_cache: Option, - split_cache_read_only: bool, ) -> anyhow::Result<(Index, HotDirectory)> { let index_storage_with_retry_on_timeout = configure_storage_retries(searcher_context, index_storage); @@ -168,7 +162,6 @@ pub(crate) async fn open_index_with_caches( searcher_context, index_storage_with_retry_on_timeout, split_and_footer_offsets, - split_cache_read_only, ) .await?; @@ -448,7 +441,6 @@ async fn leaf_search_single_split( split: SplitIdAndFooterOffsets, aggregations_limits: AggregationLimitsGuard, search_permit: &mut SearchPermit, - is_broad_search: bool, ) -> crate::Result> { let mut leaf_search_state_guard = SplitSearchStateGuard::new(ctx.split_outcome_counters.clone()); @@ -490,8 +482,6 @@ async fn leaf_search_single_split( &split, Some(ctx.doc_mapper.tokenizer_manager()), Some(byte_range_cache.clone()), - // for broad searches, we want to avoid evicting useful cached splits - is_broad_search, ) .await?; @@ -1231,7 +1221,6 @@ pub async fn multi_index_leaf_search( searcher_context: Arc, leaf_search_request: LeafSearchRequest, storage_resolver: &StorageResolver, - is_broad_search: bool, ) -> Result { let search_request: Arc = leaf_search_request .search_request @@ -1289,7 +1278,6 @@ pub async fn multi_index_leaf_search( leaf_search_request_ref.split_offsets, doc_mapper, aggregation_limits, - is_broad_search, ) .in_current_span() .await @@ -1375,7 +1363,6 @@ pub async fn single_doc_mapping_leaf_search( splits: Vec, doc_mapper: Arc, aggregations_limits: AggregationLimitsGuard, - is_broad_search: bool, ) -> Result { let num_docs: u64 = splits.iter().map(|split| split.num_docs).sum(); let num_splits = splits.len(); @@ -1400,12 +1387,10 @@ pub async fn single_doc_mapping_leaf_search( .warmup_single_split_initial_allocation, ) }); - let permit_provider = if is_broad_search { - &searcher_context.secondary_search_permit_provider - } else { - &searcher_context.search_permit_provider - }; - let permit_futures = permit_provider.get_permits(permit_sizes).await; + let permit_futures = searcher_context + .search_permit_provider + .get_permits(permit_sizes) + .await; let leaf_search_context = Arc::new(LeafSearchContext { searcher_context: searcher_context.clone(), @@ -1441,7 +1426,6 @@ pub async fn single_doc_mapping_leaf_search( split, leaf_split_search_permit, aggregations_limits.clone(), - is_broad_search, ) .in_current_span(), ); @@ -1578,11 +1562,9 @@ async fn leaf_search_single_split_wrapper( split: SplitIdAndFooterOffsets, mut search_permit: SearchPermit, aggregations_limits: AggregationLimitsGuard, - is_broad_search: bool, ) { let timer = crate::SEARCH_METRICS .leaf_search_split_duration_secs - .with_label_values([queue_label(is_broad_search)]) .start_timer(); let leaf_search_single_split_opt_res: crate::Result> = leaf_search_single_split( @@ -1592,7 +1574,6 @@ async fn leaf_search_single_split_wrapper( split.clone(), aggregations_limits, &mut search_permit, - is_broad_search, ) .await; diff --git a/quickwit/quickwit-search/src/list_fields.rs b/quickwit/quickwit-search/src/list_fields.rs index 44866ad3b71..b2ca68b2f5d 100644 --- a/quickwit/quickwit-search/src/list_fields.rs +++ b/quickwit/quickwit-search/src/list_fields.rs @@ -67,13 +67,8 @@ async fn get_fields_from_split( { return Ok(list_fields.fields); } - let (_, split_bundle) = open_split_bundle( - searcher_context, - index_storage, - split_and_footer_offsets, - false, - ) - .await?; + let (_, split_bundle) = + open_split_bundle(searcher_context, index_storage, split_and_footer_offsets).await?; let serialized_split_fields = split_bundle .get_all(Path::new(SPLIT_FIELDS_FILE_NAME)) diff --git a/quickwit/quickwit-search/src/list_terms.rs b/quickwit/quickwit-search/src/list_terms.rs index 026408737a2..3a72f26d595 100644 --- a/quickwit/quickwit-search/src/list_terms.rs +++ b/quickwit/quickwit-search/src/list_terms.rs @@ -34,7 +34,6 @@ use tantivy::{ReloadPolicy, Term}; use tracing::{debug, error, info, instrument}; use crate::leaf::open_index_with_caches; -use crate::metrics::queue_label; use crate::search_job_placer::group_jobs_by_index_id; use crate::search_permit_provider::compute_initial_memory_allocation; use crate::{ClusterClient, SearchError, SearchJob, SearcherContext, resolve_index_patterns}; @@ -217,7 +216,7 @@ async fn leaf_list_terms_single_split( let cache = ByteRangeCache::with_infinite_capacity(&quickwit_storage::STORAGE_METRICS.shortlived_cache); let (index, _) = - open_index_with_caches(searcher_context, storage, &split, None, Some(cache), false).await?; + open_index_with_caches(searcher_context, storage, &split, None, Some(cache)).await?; let split_schema = index.schema(); let reader = index .reader_builder() @@ -351,7 +350,6 @@ pub async fn leaf_list_terms( crate::SEARCH_METRICS.leaf_list_terms_splits_total.inc(); let timer = crate::SEARCH_METRICS .leaf_search_split_duration_secs - .with_label_values([queue_label(false)]) .start_timer(); let leaf_search_single_split_res = leaf_list_terms_single_split( &searcher_context_clone, diff --git a/quickwit/quickwit-search/src/metrics.rs b/quickwit/quickwit-search/src/metrics.rs index 478b3524694..1b8a990340f 100644 --- a/quickwit/quickwit-search/src/metrics.rs +++ b/quickwit/quickwit-search/src/metrics.rs @@ -143,17 +143,15 @@ pub struct SearchMetrics { pub root_search_requests_total: IntCounterVec<2>, pub root_search_request_duration_seconds: HistogramVec<2>, pub root_search_targeted_splits: HistogramVec<2>, - pub leaf_search_requests_total: IntCounterVec<2>, - pub leaf_search_request_duration_seconds: HistogramVec<2>, - pub leaf_search_targeted_splits: HistogramVec<2>, + pub leaf_search_requests_total: IntCounterVec<1>, + pub leaf_search_request_duration_seconds: HistogramVec<1>, + pub leaf_search_targeted_splits: HistogramVec<1>, pub leaf_list_terms_splits_total: IntCounter, pub split_search_outcome_total: SplitSearchOutcomeCounters, - pub leaf_search_split_duration_secs: HistogramVec<1>, + pub leaf_search_split_duration_secs: Histogram, pub job_assigned_total: IntCounterVec<1>, pub leaf_search_single_split_tasks_pending: IntGauge, pub leaf_search_single_split_tasks_ongoing: IntGauge, - pub leaf_search_single_split_secondary_tasks_pending: IntGauge, - pub leaf_search_single_split_secondary_tasks_ongoing: IntGauge, pub leaf_search_single_split_warmup_num_bytes: Histogram, pub searcher_local_kv_store_size_bytes: IntGauge, } @@ -188,14 +186,13 @@ impl Default for SearchMetrics { ByteSize::gb(5).as_u64() as f64, ]; - let leaf_search_single_split_tasks = new_gauge_vec::<2>( + let leaf_search_single_split_tasks = new_gauge_vec::<1>( "leaf_search_single_split_tasks", "Number of single split search tasks pending or ongoing", "search", &[], [ "status", // "ongoing" or "pending" - "queue", // "primary" or "secondary" ], ); @@ -228,14 +225,14 @@ impl Default for SearchMetrics { "Total number of leaf search gRPC requests processed.", "search", &[("kind", "server")], - ["status", "queue"], + ["status"], ), leaf_search_request_duration_seconds: new_histogram_vec( "leaf_search_request_duration_seconds", "Duration of leaf search gRPC requests in seconds.", "search", &[("kind", "server")], - ["status", "queue"], + ["status"], duration_buckets(), ), leaf_search_targeted_splits: new_histogram_vec( @@ -243,7 +240,7 @@ impl Default for SearchMetrics { "Number of splits targeted per leaf search GRPC request.", "search", &[], - ["status", "queue"], + ["status"], targeted_splits_buckets, ), @@ -254,24 +251,18 @@ impl Default for SearchMetrics { &[], ), split_search_outcome_total: SplitSearchOutcomeCounters::new_registered(), - leaf_search_split_duration_secs: new_histogram_vec( + leaf_search_split_duration_secs: new_histogram( "leaf_search_split_duration_secs", "Number of seconds required to run a leaf search over a single split. The timer \ starts after the semaphore is obtained.", "search", - &[], - ["queue"], duration_buckets(), ), // we need to expose the gauges here to provide a static ref to for the gauge guards leaf_search_single_split_tasks_ongoing: leaf_search_single_split_tasks - .with_label_values(["ongoing", "primary"]), + .with_label_values(["ongoing"]), leaf_search_single_split_tasks_pending: leaf_search_single_split_tasks - .with_label_values(["pending", "primary"]), - leaf_search_single_split_secondary_tasks_ongoing: leaf_search_single_split_tasks - .with_label_values(["ongoing", "secondary"]), - leaf_search_single_split_secondary_tasks_pending: leaf_search_single_split_tasks - .with_label_values(["pending", "secondary"]), + .with_label_values(["pending"]), leaf_search_single_split_warmup_num_bytes: new_histogram( "leaf_search_single_split_warmup_num_bytes", "Size of the short lived cache for a single split once the warmup is done.", @@ -296,15 +287,7 @@ impl Default for SearchMetrics { } } -pub fn queue_label(is_broad_search: bool) -> &'static str { - if is_broad_search { - "secondary" - } else { - "primary" - } -} - -/// Metrics for the various instances of permit providers. +/// Metrics for the permit provider. #[derive(Clone)] pub struct SearchTaskMetrics { pub ongoing_tasks: &'static IntGauge, @@ -318,13 +301,6 @@ impl SearchMetrics { pending_tasks: &self.leaf_search_single_split_tasks_pending, } } - - pub fn secondary_search_task_metrics(&'static self) -> SearchTaskMetrics { - SearchTaskMetrics { - ongoing_tasks: &self.leaf_search_single_split_secondary_tasks_ongoing, - pending_tasks: &self.leaf_search_single_split_secondary_tasks_pending, - } - } } /// `SEARCH_METRICS` exposes a bunch a set of storage/cache related metrics through a prometheus diff --git a/quickwit/quickwit-search/src/metrics_trackers.rs b/quickwit/quickwit-search/src/metrics_trackers.rs index 503a4664a5f..5de4d1bc922 100644 --- a/quickwit/quickwit-search/src/metrics_trackers.rs +++ b/quickwit/quickwit-search/src/metrics_trackers.rs @@ -23,7 +23,7 @@ use quickwit_proto::search::{LeafSearchResponse, SearchResponse, SplitsByOutcome use tracing::{Span, record_all}; use crate::SearchError; -use crate::metrics::{SEARCH_METRICS, queue_label}; +use crate::metrics::SEARCH_METRICS; // planning @@ -212,16 +212,12 @@ pub struct LeafSearchMetricsFuture { pub start: Instant, pub targeted_splits: usize, pub status: Option<&'static str>, - pub is_broad_search: bool, } #[pinned_drop] impl PinnedDrop for LeafSearchMetricsFuture { fn drop(self: Pin<&mut Self>) { - let label_values = [ - self.status.unwrap_or("cancelled"), - queue_label(self.is_broad_search), - ]; + let label_values = [self.status.unwrap_or("cancelled")]; SEARCH_METRICS .leaf_search_requests_total .with_label_values(label_values) diff --git a/quickwit/quickwit-search/src/service.rs b/quickwit/quickwit-search/src/service.rs index e62661278fb..74648c0e1eb 100644 --- a/quickwit/quickwit-search/src/service.rs +++ b/quickwit/quickwit-search/src/service.rs @@ -187,33 +187,16 @@ impl SearchService for SearchServiceImpl { .map(|req| req.split_offsets.len()) .sum::(); - let is_broad_search = if let Some(threshold) = self - .searcher_context - .searcher_config - .secondary_targeted_split_count_threshold - { - num_splits >= threshold - } else { - false - }; - let timeout = if is_broad_search { - self.searcher_context - .searcher_config - .secondary_request_timeout() - } else { - self.searcher_context.searcher_config.request_timeout() - }; + let timeout = self.searcher_context.searcher_config.request_timeout(); let tracked_future = LeafSearchMetricsFuture { tracked: multi_index_leaf_search( self.searcher_context.clone(), leaf_search_request, &self.storage_resolver, - is_broad_search, ), start: Instant::now(), targeted_splits: num_splits, status: None, - is_broad_search, }; tokio::time::timeout(timeout, tracked_future).await? } @@ -422,8 +405,6 @@ pub struct SearcherContext { pub fast_fields_cache: Arc, /// Limit the concurrency for small snappy interactive searches. pub search_permit_provider: SearchPermitProvider, - /// Limit the concurrency for larger searches that target many splits. - pub secondary_search_permit_provider: SearchPermitProvider, /// Split footer cache. pub split_footer_cache: MemorySizedCache, /// Per-split and per-query cache. @@ -466,11 +447,6 @@ impl SearcherContext { searcher_config.warmup_memory_budget, SEARCH_METRICS.search_task_metrics(), ); - let secondary_leaf_search_split_semaphore = SearchPermitProvider::new( - searcher_config.secondary_max_num_concurrent_split_searches, - searcher_config.secondary_warmup_memory_budget, - SEARCH_METRICS.secondary_search_task_metrics(), - ); let fast_field_cache_capacity = searcher_config.fast_field_cache_capacity.as_u64() as usize; let storage_long_term_cache = Arc::new(QuickwitCache::new(fast_field_cache_capacity)); let leaf_search_cache = @@ -489,7 +465,6 @@ impl SearcherContext { fast_fields_cache: storage_long_term_cache, predicate_cache: predicate_cache.into(), search_permit_provider: leaf_search_split_semaphore, - secondary_search_permit_provider: secondary_leaf_search_split_semaphore, split_footer_cache: global_split_footer_cache, leaf_search_cache, list_fields_cache, diff --git a/quickwit/quickwit-search/src/tests.rs b/quickwit/quickwit-search/src/tests.rs index 1b7cd4f5797..d20fbd881d8 100644 --- a/quickwit/quickwit-search/src/tests.rs +++ b/quickwit/quickwit-search/src/tests.rs @@ -1136,7 +1136,6 @@ async fn test_search_util(test_sandbox: &TestSandbox, query: &str) -> Vec { splits_offsets, test_sandbox.doc_mapper(), agg_limits, - false, ) .await .unwrap(); diff --git a/quickwit/quickwit-storage/src/split_cache/mod.rs b/quickwit/quickwit-storage/src/split_cache/mod.rs index 58f8716cda3..5ee6ea2f1a5 100644 --- a/quickwit/quickwit-storage/src/split_cache/mod.rs +++ b/quickwit/quickwit-storage/src/split_cache/mod.rs @@ -126,15 +126,10 @@ impl SplitCache { } /// Wraps a storage with our split cache. - pub fn wrap_storage( - self_arc: Arc, - storage: Arc, - read_only: bool, - ) -> Arc { + pub fn wrap_storage(self_arc: Arc, storage: Arc) -> Arc { let cache = Arc::new(SplitCacheBackingStorage { split_cache: self_arc, storage_root_uri: storage.uri().clone(), - read_only, }); wrap_storage_with_cache(cache, storage) } @@ -156,20 +151,15 @@ impl SplitCache { } // Returns a split guard object. As long as it is not dropped, the - // split won't be evinced from the cache. - async fn get_split_file( - &self, - split_id: Ulid, - storage_uri: &Uri, - read_only: bool, - ) -> Option { + // split won't be evicted from the cache. + async fn get_split_file(&self, split_id: Ulid, storage_uri: &Uri) -> Option { // We touch before even checking the fd cache in order to update the file's last access time // for the file cache. - let num_bytes_opt: Option = - self.split_table - .lock() - .unwrap() - .touch(split_id, storage_uri, read_only); + let num_bytes_opt: Option = self + .split_table + .lock() + .unwrap() + .touch(split_id, storage_uri); let num_bytes = num_bytes_opt?; self.fd_cache @@ -205,7 +195,6 @@ fn split_id_from_path(split_path: &Path) -> Option { struct SplitCacheBackingStorage { split_cache: Arc, storage_root_uri: Uri, - read_only: bool, } impl SplitCacheBackingStorage { @@ -213,7 +202,7 @@ impl SplitCacheBackingStorage { let split_id = split_id_from_path(path)?; let split_file: SplitFile = self .split_cache - .get_split_file(split_id, &self.storage_root_uri, self.read_only) + .get_split_file(split_id, &self.storage_root_uri) .await?; split_file.get_range(byte_range).await.ok() } @@ -222,7 +211,7 @@ impl SplitCacheBackingStorage { let split_id = split_id_from_path(path)?; let split_file = self .split_cache - .get_split_file(split_id, &self.storage_root_uri, self.read_only) + .get_split_file(split_id, &self.storage_root_uri) .await?; split_file.get_all().await.ok() } diff --git a/quickwit/quickwit-storage/src/split_cache/split_table.rs b/quickwit/quickwit-storage/src/split_cache/split_table.rs index b9e5f2d8d2c..90eb1ab2c99 100644 --- a/quickwit/quickwit-storage/src/split_cache/split_table.rs +++ b/quickwit/quickwit-storage/src/split_cache/split_table.rs @@ -242,16 +242,14 @@ impl SplitTable { /// cache (if in cache). /// /// If the file is already on the disk cache, return `Some(num_bytes)`. - /// If the file is not in cache, return `None`, and register the file in the candidate for - /// download list. - pub fn touch(&mut self, split_ulid: Ulid, storage_uri: &Uri, read_only: bool) -> Option { + /// If the file is not in cache, register the file in the candidate for download list, and + /// return `None`. + pub fn touch(&mut self, split_ulid: Ulid, storage_uri: &Uri) -> Option { let timestamp = compute_timestamp(self.origin_time); let status = self.mutate_split(split_ulid, |old_split_info| { if let Some(mut split_info) = old_split_info { split_info.split_key.last_accessed = timestamp; Some(split_info) - } else if read_only { - None } else { let split_key = SplitKey { split_ulid, @@ -510,7 +508,7 @@ mod tests { let ulid2 = ulids[1]; split_table.report(ulid1, Uri::for_test(TEST_STORAGE_URI)); split_table.report(ulid2, Uri::for_test(TEST_STORAGE_URI)); - let num_bytes_opt = split_table.touch(ulid1, &Uri::for_test("s3://test1/"), false); + let num_bytes_opt = split_table.touch(ulid1, &Uri::for_test("s3://test1/")); assert!(num_bytes_opt.is_none()); let candidate = split_table.best_candidate().unwrap(); assert_eq!(candidate.split_ulid, ulid1); @@ -536,7 +534,7 @@ mod tests { split_table.register_as_downloaded(ulid1, 10_000_000); assert_eq!(split_table.num_bytes(), 10_000_000); assert_eq!( - split_table.touch(ulid1, &Uri::for_test(TEST_STORAGE_URI), false), + split_table.touch(ulid1, &Uri::for_test(TEST_STORAGE_URI)), Some(10_000_000) ); let ulid2 = Ulid::new();