pub unsafe fn recover(&mut self, 
        #[cfg(feature = "check_double_free")]
        check_double_free: &mut HashSet<u64>
    ) {
        let mut curr = self.pages;
        while let Some(page) = curr.as_option() {
            page.notify();
            curr = page.next;
        }
        let mut curr = self.pages;
        let resume = self.resume();
        if !self.is_set(JOURNAL_COMMITTED) || resume {
            let rollback = !resume || !self.is_set(JOURNAL_COMMITTED);
            #[cfg(any(feature = "use_pspd", feature = "use_vspd"))] {
                if rollback {
                    self.spd.rollback();
                } else {
                    self.spd.recover();
                }
            }
            while let Some(page) = curr.as_option() {
                page.recover(rollback, 
                    #[cfg(feature = "check_double_free")]
                    check_double_free
                );
                curr = page.next;
            }
            self.set(JOURNAL_COMMITTED);
        }
    }
/// Recovers from a crash or power failure
Recovers from a crash or power failure
Recovers from a crash or power failure
pub unsafe fn recover(&mut self, 
        #[cfg(feature = "check_double_free")]
        check_double_free: &mut HashSet<u64>
    ) {
        let mut curr = self.pages;
        while let Some(page) = curr.as_option() {
            page.notify();
            curr = page.next;
        }
        let mut curr = self.pages;
        let resume = self.resume();
        if !self.is_set(JOURNAL_COMMITTED) || resume {
            let rollback = !resume || !self.is_set(JOURNAL_COMMITTED);
            #[cfg(any(feature = "use_pspd", feature = "use_vspd"))] {
                if rollback {
                    self.spd.rollback();
                } else {
                    self.spd.recover();
                }
            }
            while let Some(page) = curr.as_option() {
                page.recover(rollback, 
                    #[cfg(feature = "check_double_free")]
                    check_double_free
                );
                curr = page.next;
            }
            self.set(JOURNAL_COMMITTED);
        }
    }
pub unsafe fn recover ( & mut self , # [ cfg ( feature " " ) ] check_double_free : & mut HashSet < u64 > ) { let mut curr = self . pages ; while let Some ( page ) = curr . as_option ( ) { page . notify ( ) ; curr = page . next ; } let mut curr = self . pages ; let resume = self . resume ( ) ; if ! self . is_set ( JOURNAL_COMMITTED ) || resume { let rollback = ! resume || ! self . is_set ( JOURNAL_COMMITTED ) ; # [ cfg ( any ( feature " " feature " " ) ) ] { if rollback { self . spd . rollback ( ) ; } else { self . spd . recover ( ) ; } } while let Some ( page ) = curr . as_option ( ) { page . recover ( rollback , # [ cfg ( feature " " ) ] check_double_free ) ; curr = page . next ; } self . set ( JOURNAL_COMMITTED ) ; } }
Recovers from a crash or power failure
Recovers from a crash or power failure
&mut self
check_double_free
&mut HashSet<u64>