pub fn merge_append_table(&mut self, rhs: &mut Self) {
        debug_assert_eq!(self.region_id, rhs.region_id);
        debug_assert_eq!(self.rewrite_count, self.entry_indexes.len());
        debug_assert_eq!(rhs.rewrite_count, 0);

        if let Some((first, _)) = rhs.span() {
            self.prepare_append(
                first,
                // FIXME: It's possibly okay to set it to false. Any compact
                // command applied to append queue will also be applied to
                // rewrite queue.
                true, /* allow_hole */
                // Compact -> Rewrite -> Data loss of the compact command.
                true, /* allow_overwrite */
            );
            self.global_stats.add(
                rhs.entry_indexes[0].entries.unwrap().id.queue,
                rhs.entry_indexes.len(),
            );
            self.entry_indexes.append(&mut rhs.entry_indexes);
        }

        for (key, (value, file_id)) in rhs.kvs.iter() {
            self.put(key.clone(), value.clone(), *file_id);
        }

        let deleted = rhs.global_stats.deleted_rewrite_entries();
        self.global_stats.add(LogQueue::Rewrite, deleted);
        self.global_stats.delete(LogQueue::Rewrite, deleted);
    }
/// Merges with a [`MemTable`] that contains only append data. Assumes
/// `self` contains all rewritten data of the same region.
///
/// This method is only used for recovery.
Merges with a [`MemTable`] that contains only append data. Assumes
`self` contains all rewritten data of the same region.

This method is only used for recovery.
Merges with a [ ` MemTable ` ] that contains only append data . Assumes ` self ` contains all rewritten data of the same region . This method is only used for recovery .
pub fn merge_append_table(&mut self, rhs: &mut Self) {
        debug_assert_eq!(self.region_id, rhs.region_id);
        debug_assert_eq!(self.rewrite_count, self.entry_indexes.len());
        debug_assert_eq!(rhs.rewrite_count, 0);
        if let Some((first, _)) = rhs.span() {
            self.prepare_append(
                first,
                // FIXME: It's possibly okay to set it to false. Any compact
                // command applied to append queue will also be applied to
                // rewrite queue.
                true, /* allow_hole */
                // Compact -> Rewrite -> Data loss of the compact command.
                true, /* allow_overwrite */
            );
            self.global_stats.add(
                rhs.entry_indexes[0].entries.unwrap().id.queue,
                rhs.entry_indexes.len(),
            );
            self.entry_indexes.append(&mut rhs.entry_indexes);
        }
        for (key, (value, file_id)) in rhs.kvs.iter() {
            self.put(key.clone(), value.clone(), *file_id);
        }
        let deleted = rhs.global_stats.deleted_rewrite_entries();
        self.global_stats.add(LogQueue::Rewrite, deleted);
        self.global_stats.delete(LogQueue::Rewrite, deleted);
    }
pub fn merge_append_table ( & mut self , rhs : & mut Self ) { debug_assert_eq ! ( self region_id rhs region_id ) ; debug_assert_eq ! ( self rewrite_count self entry_indexes len ( ) ) ; debug_assert_eq ! ( rhs rewrite_count 0 ) ; if let Some ( ( first , _ ) ) = rhs . span ( ) { self . prepare_append ( first , // FIXME: It's possibly okay to set it to false. Any compact // command applied to append queue will also be applied to // rewrite queue. true , /* allow_hole */ // Compact -> Rewrite -> Data loss of the compact command. true , /* allow_overwrite */ ) ; self . global_stats . add ( rhs . entry_indexes [ 0 ] . entries . unwrap ( ) . id . queue , rhs . entry_indexes . len ( ) , ) ; self . entry_indexes . append ( & mut rhs . entry_indexes ) ; } for ( key , ( value , file_id ) ) in rhs . kvs . iter ( ) { self . put ( key . clone ( ) , value . clone ( ) , * file_id ) ; } let deleted = rhs . global_stats . deleted_rewrite_entries ( ) ; self . global_stats . add ( LogQueue :: Rewrite , deleted ) ; self . global_stats . delete ( LogQueue :: Rewrite , deleted ) ; }
Merges with a [`MemTable`] that contains only append data.
Merges with a [ ` MemTable ` ] that contains only append data .
&mut self
rhs
&mut Self