pub fn update_optimizer_params(&self, optimizer_config_diff: OptimizersConfigDiff) -> CollectionResult<()> {
        {
            let mut config = self.config.write();
            config.optimizer_config = optimizer_config_diff.update(&config.optimizer_config)?;
            config.save(self.path.as_path())?;
        }
        let config = self.config.read();
        let mut update_handler = self.update_handler.lock();
        self.stop()?;
        update_handler.wait_worker_stops()?;
        let new_optimizers = build_optimizers(
            self.path.as_path(),
            &config.params,
            &config.optimizer_config,
            &config.hnsw_config
        );
        update_handler.optimizers = new_optimizers;
        update_handler.flush_timeout_sec = config.optimizer_config.flush_interval_sec;
        update_handler.run_worker();
        self.update_sender.send(UpdateSignal::Nop)?;

        Ok(())
    }
/// Updates collection optimization params:
/// - Saves new params on disk
/// - Stops existing optimization loop
/// - Runs new optimizers with new params
Updates collection optimization params:
Saves new params on disk
Stops existing optimization loop
Runs new optimizers with new params
Updates collection optimization params : Saves new params on disk Stops existing optimization loop Runs new optimizers with new params
pub fn update_optimizer_params(&self, optimizer_config_diff: OptimizersConfigDiff) -> CollectionResult<()> {
        {
            let mut config = self.config.write();
            config.optimizer_config = optimizer_config_diff.update(&config.optimizer_config)?;
            config.save(self.path.as_path())?;
        }
        let config = self.config.read();
        let mut update_handler = self.update_handler.lock();
        self.stop()?;
        update_handler.wait_worker_stops()?;
        let new_optimizers = build_optimizers(
            self.path.as_path(),
            &config.params,
            &config.optimizer_config,
            &config.hnsw_config
        );
        update_handler.optimizers = new_optimizers;
        update_handler.flush_timeout_sec = config.optimizer_config.flush_interval_sec;
        update_handler.run_worker();
        self.update_sender.send(UpdateSignal::Nop)?;
        Ok(())
    }
pub fn update_optimizer_params ( & self , optimizer_config_diff : OptimizersConfigDiff ) -> CollectionResult < ( ) > { { let mut config = self . config . write ( ) ; config . optimizer_config = optimizer_config_diff . update ( & config . optimizer_config ) ? ; config . save ( self . path . as_path ( ) ) ? ; } let config = self . config . read ( ) ; let mut update_handler = self . update_handler . lock ( ) ; self . stop ( ) ? ; update_handler . wait_worker_stops ( ) ? ; let new_optimizers = build_optimizers ( self . path . as_path ( ) , & config . params , & config . optimizer_config , & config . hnsw_config ) ; update_handler . optimizers = new_optimizers ; update_handler . flush_timeout_sec = config . optimizer_config . flush_interval_sec ; update_handler . run_worker ( ) ; self . update_sender . send ( UpdateSignal :: Nop ) ? ; Ok ( ( ) ) }
Updates collection optimization params:
 Saves new params on disk
 Stops existing optimization loop
 Runs new optimizers with new params
Updates collection optimization params : Saves new params on disk Stops existing optimization loop Runs new optimizers with new params
&self
optimizer_config_diff
OptimizersConfigDiff
&self
optimizer_config_diff
OptimizersConfigDiff