@@ -357,8 +357,7 @@ where
357
357
recover_concurrency : usize ,
358
358
flushers : usize ,
359
359
reclaimers : usize ,
360
- // FIXME(MrCroxx): rename the field and builder fn.
361
- buffer_threshold : usize ,
360
+ buffer_pool_size : usize ,
362
361
clean_region_threshold : Option < usize > ,
363
362
eviction_pickers : Vec < Box < dyn EvictionPicker > > ,
364
363
admission_picker : Arc < dyn AdmissionPicker < Key = K > > ,
@@ -387,7 +386,7 @@ where
387
386
recover_concurrency : 8 ,
388
387
flushers : 1 ,
389
388
reclaimers : 1 ,
390
- buffer_threshold : 16 * 1024 * 1024 , // 16 MiB
389
+ buffer_pool_size : 16 * 1024 * 1024 , // 16 MiB
391
390
clean_region_threshold : None ,
392
391
eviction_pickers : vec ! [ Box :: new( InvalidRatioPicker :: new( 0.8 ) ) , Box :: <FifoPicker >:: default ( ) ] ,
393
392
admission_picker : Arc :: < AdmitAllPicker < K > > :: default ( ) ,
@@ -469,15 +468,32 @@ where
469
468
self
470
469
}
471
470
471
+ // FIXME(MrCroxx): remove it after 0.12
472
472
/// Set the total flush buffer threshold.
473
473
///
474
474
/// Each flusher shares a volume at `threshold / flushers`.
475
475
///
476
476
/// If the buffer of the flush queue exceeds the threshold, the further entries will be ignored.
477
477
///
478
478
/// Default: 16 MiB.
479
+ #[ deprecated(
480
+ since = "0.11.4" ,
481
+ note = "The function will be renamed to \" with_buffer_pool_size()\" , use it instead."
482
+ ) ]
479
483
pub fn with_buffer_threshold ( mut self , threshold : usize ) -> Self {
480
- self . buffer_threshold = threshold;
484
+ self . buffer_pool_size = threshold;
485
+ self
486
+ }
487
+
488
+ /// Set the total flush buffer pool size.
489
+ ///
490
+ /// Each flusher shares a volume at `threshold / flushers`.
491
+ ///
492
+ /// If the buffer of the flush queue exceeds the threshold, the further entries will be ignored.
493
+ ///
494
+ /// Default: 16 MiB.
495
+ pub fn with_buffer_pool_size ( mut self , buffer_pool_size : usize ) -> Self {
496
+ self . buffer_pool_size = buffer_pool_size;
481
497
self
482
498
}
483
499
@@ -659,7 +675,7 @@ where
659
675
eviction_pickers : self . eviction_pickers ,
660
676
reinsertion_picker : self . reinsertion_picker ,
661
677
tombstone_log_config : self . tombstone_log_config ,
662
- buffer_threshold : self . buffer_threshold ,
678
+ buffer_threshold : self . buffer_pool_size ,
663
679
statistics : statistics. clone ( ) ,
664
680
write_runtime_handle,
665
681
read_runtime_handle,
@@ -702,7 +718,7 @@ where
702
718
eviction_pickers : self . eviction_pickers ,
703
719
reinsertion_picker : self . reinsertion_picker ,
704
720
tombstone_log_config : self . tombstone_log_config ,
705
- buffer_threshold : self . buffer_threshold ,
721
+ buffer_threshold : self . buffer_pool_size ,
706
722
statistics : statistics. clone ( ) ,
707
723
write_runtime_handle,
708
724
read_runtime_handle,
0 commit comments