@@ -25,7 +25,6 @@ use quickwit_actors::{
2525 Observation ,
2626} ;
2727use quickwit_cluster:: Cluster ;
28- use quickwit_common:: fs:: get_cache_directory_path;
2928use quickwit_common:: pubsub:: EventBroker ;
3029use quickwit_common:: temp_dir;
3130use quickwit_config:: {
@@ -56,7 +55,7 @@ use tracing::{debug, error, info, warn};
5655
5756use crate :: models:: { DetachIndexingPipeline , ObservePipeline , SpawnPipeline } ;
5857use crate :: source:: { AssignShards , Assignment } ;
59- use crate :: split_store:: { IndexingSplitCache , SplitStoreQuota } ;
58+ use crate :: split_store:: IndexingSplitCache ;
6059use crate :: { IndexingPipeline , IndexingPipelineParams , IndexingSplitStore , IndexingStatistics } ;
6160
6261/// Name of the indexing directory, usually located at `<data_dir_path>/indexing`.
@@ -94,7 +93,7 @@ pub struct IndexingService {
9493 storage_resolver : StorageResolver ,
9594 indexing_pipelines : HashMap < PipelineUid , PipelineHandle > ,
9695 counters : IndexingServiceCounters ,
97- local_split_store : Arc < IndexingSplitCache > ,
96+ split_cache : Arc < IndexingSplitCache > ,
9897 max_concurrent_split_uploads : usize ,
9998 cooperative_indexing_permits : Option < Arc < Semaphore > > ,
10099 event_broker : EventBroker ,
@@ -124,14 +123,8 @@ impl IndexingService {
124123 ingester_pool : IngesterPool ,
125124 storage_resolver : StorageResolver ,
126125 event_broker : EventBroker ,
126+ split_cache : Arc < IndexingSplitCache > ,
127127 ) -> anyhow:: Result < IndexingService > {
128- let split_store_space_quota = SplitStoreQuota :: try_new (
129- indexer_config. split_store_max_num_splits ,
130- indexer_config. split_store_max_num_bytes ,
131- ) ?;
132- let split_cache_dir_path = get_cache_directory_path ( & data_dir_path) ;
133- let local_split_store =
134- IndexingSplitCache :: open ( split_cache_dir_path, split_store_space_quota) . await ?;
135128 let indexing_root_directory =
136129 temp_dir:: create_or_purge_directory ( & data_dir_path. join ( INDEXING_DIR_NAME ) ) . await ?;
137130 let queue_dir_path = data_dir_path. join ( QUEUES_DIR_NAME ) ;
@@ -149,7 +142,7 @@ impl IndexingService {
149142 ingest_api_service_opt,
150143 ingester_pool,
151144 storage_resolver,
152- local_split_store : Arc :: new ( local_split_store ) ,
145+ split_cache ,
153146 indexing_pipelines : Default :: default ( ) ,
154147 counters : Default :: default ( ) ,
155148 max_concurrent_split_uploads : indexer_config. max_concurrent_split_uploads ,
@@ -245,7 +238,7 @@ impl IndexingService {
245238 } ) ?;
246239 let merge_policy =
247240 crate :: merge_policy:: merge_policy_from_settings ( & index_config. indexing_settings ) ;
248- let split_store = IndexingSplitStore :: new ( storage. clone ( ) , self . local_split_store . clone ( ) ) ;
241+ let split_store = IndexingSplitStore :: new ( storage. clone ( ) , self . split_cache . clone ( ) ) ;
249242
250243 let doc_mapper = build_doc_mapper ( & index_config. doc_mapping , & index_config. search_settings )
251244 . map_err ( |error| IndexingError :: Internal ( error. to_string ( ) ) ) ?;
@@ -828,6 +821,7 @@ mod tests {
828821 IngesterPool :: default ( ) ,
829822 storage_resolver. clone ( ) ,
830823 EventBroker :: default ( ) ,
824+ Arc :: new ( IndexingSplitCache :: no_caching ( ) ) ,
831825 )
832826 . await
833827 . unwrap ( ) ;
@@ -1435,6 +1429,7 @@ mod tests {
14351429 IngesterPool :: default ( ) ,
14361430 storage_resolver. clone ( ) ,
14371431 EventBroker :: default ( ) ,
1432+ Arc :: new ( IndexingSplitCache :: no_caching ( ) ) ,
14381433 )
14391434 . await
14401435 . unwrap ( ) ;
0 commit comments