pub fn apply_rewrite_writes(
        &self,
        log_items: LogItemDrain,
        watermark: Option<FileSeq>,
        new_file: FileSeq,
    ) {
        for item in log_items {
            let raft = item.raft_group_id;
            let memtable = self.get_or_insert(raft);
            match item.content {
                LogItemContent::EntryIndexes(entries_to_add) => {
                    memtable.write().rewrite(entries_to_add.0, watermark);
                }
                LogItemContent::Kv(kv) => match kv.op_type {
                    OpType::Put => {
                        let key = kv.key;
                        memtable.write().rewrite_key(key, watermark, new_file);
                    }
                    _ => unreachable!(),
                },
                LogItemContent::Command(Command::Clean) => {}
                _ => unreachable!(),
            }
        }
    }
/// Applies changes from log items that have been written to rewrite queue.
Applies changes from log items that have been written to rewrite queue.
Applies changes from log items that have been written to rewrite queue .
pub fn apply_rewrite_writes(
        &self,
        log_items: LogItemDrain,
        watermark: Option<FileSeq>,
        new_file: FileSeq,
    ) {
        for item in log_items {
            let raft = item.raft_group_id;
            let memtable = self.get_or_insert(raft);
            match item.content {
                LogItemContent::EntryIndexes(entries_to_add) => {
                    memtable.write().rewrite(entries_to_add.0, watermark);
                }
                LogItemContent::Kv(kv) => match kv.op_type {
                    OpType::Put => {
                        let key = kv.key;
                        memtable.write().rewrite_key(key, watermark, new_file);
                    }
                    _ => unreachable!(),
                },
                LogItemContent::Command(Command::Clean) => {}
                _ => unreachable!(),
            }
        }
    }
pub fn apply_rewrite_writes ( & self , log_items : LogItemDrain , watermark : Option < FileSeq > , new_file : FileSeq , ) { for item in log_items { let raft = item . raft_group_id ; let memtable = self . get_or_insert ( raft ) ; match item . content { LogItemContent :: EntryIndexes ( entries_to_add ) => { memtable . write ( ) . rewrite ( entries_to_add . 0 , watermark ) ; } LogItemContent :: Kv ( kv ) => match kv . op_type { OpType :: Put => { let key = kv . key ; memtable . write ( ) . rewrite_key ( key , watermark , new_file ) ; } _ => unreachable ! ( ) , } , LogItemContent :: Command ( Command :: Clean ) => { } _ => unreachable ! ( ) , } } }
Applies changes from log items that have been written to rewrite queue.
Applies changes from log items that have been written to rewrite queue .
&self
log_items
LogItemDrain
watermark
Option<FileSeq>
new_file
FileSeq