fn rebuild_indices(&mut self) -> () {
        info!("Rebuilding indices...");
        let checkpoint = self.current_db.clone();
        let send = self.send.clone();
        self.catchup_txs = Some(Vec::new());

        thread::spawn(move || {
            let Db {
                eav,
                ave,
                aev,
                vae,
                ..
            } = checkpoint;

            let new_ave_handle = thread::spawn(move || ave.rebuild());
            let new_aev_handle = thread::spawn(move || aev.rebuild());
            let new_vae_handle = thread::spawn(move || vae.rebuild());
            let new_eav = eav.rebuild();
            let new_ave = new_ave_handle.join().unwrap();
            let new_aev = new_aev_handle.join().unwrap();
            let new_vae = new_vae_handle.join().unwrap();

            send.send(Event::RebuiltIndex(Db {
                eav: new_eav,
                ave: new_ave,
                aev: new_aev,
                vae: new_vae,
                schema: checkpoint.schema.clone(),
                store: checkpoint.store.clone(),
            }))
        });
    }
/// Builds a new set of durable indices by combining the existing
/// durable indices and the in-memory indices.
Builds a new set of durable indices by combining the existing
durable indices and the in-memory indices.
Builds a new set of durable indices by combining the existing durable indices and the in - memory indices .
fn rebuild_indices(&mut self) -> () {
        info!("Rebuilding indices...");
        let checkpoint = self.current_db.clone();
        let send = self.send.clone();
        self.catchup_txs = Some(Vec::new());
        thread::spawn(move || {
            let Db {
                eav,
                ave,
                aev,
                vae,
                ..
            } = checkpoint;
            let new_ave_handle = thread::spawn(move || ave.rebuild());
            let new_aev_handle = thread::spawn(move || aev.rebuild());
            let new_vae_handle = thread::spawn(move || vae.rebuild());
            let new_eav = eav.rebuild();
            let new_ave = new_ave_handle.join().unwrap();
            let new_aev = new_aev_handle.join().unwrap();
            let new_vae = new_vae_handle.join().unwrap();
            send.send(Event::RebuiltIndex(Db {
                eav: new_eav,
                ave: new_ave,
                aev: new_aev,
                vae: new_vae,
                schema: checkpoint.schema.clone(),
                store: checkpoint.store.clone(),
            }))
        });
    }
fn rebuild_indices ( & mut self ) -> ( ) { info ! ( " " ) ; let checkpoint = self . current_db . clone ( ) ; let send = self . send . clone ( ) ; self . catchup_txs = Some ( Vec :: new ( ) ) ; thread :: spawn ( move | | { let Db { eav , ave , aev , vae , .. } = checkpoint ; let new_ave_handle = thread :: spawn ( move | | ave . rebuild ( ) ) ; let new_aev_handle = thread :: spawn ( move | | aev . rebuild ( ) ) ; let new_vae_handle = thread :: spawn ( move | | vae . rebuild ( ) ) ; let new_eav = eav . rebuild ( ) ; let new_ave = new_ave_handle . join ( ) . unwrap ( ) ; let new_aev = new_aev_handle . join ( ) . unwrap ( ) ; let new_vae = new_vae_handle . join ( ) . unwrap ( ) ; send . send ( Event :: RebuiltIndex ( Db { eav : new_eav , ave : new_ave , aev : new_aev , vae : new_vae , schema : checkpoint . schema . clone ( ) , store : checkpoint . store . clone ( ) , } ) ) } ) ; }
Builds a new set of durable indices by combining the existing
durable indices and the in-memory indices.
Builds a new set of durable indices by combining the existing durable indices and the in - memory indices .
&mut self
&mut self