pub async fn apply_mutation(
        &self,
        object_id: u64,
        mutation: Mutation,
        replay: bool,
        checkpoint: &JournalCheckpoint,
    ) {
        {
            let mut objects = self.objects.write().unwrap();
            objects.journal_file_checkpoints.entry(object_id).or_insert_with(|| checkpoint.clone());
            if object_id == objects.allocator_object_id {
                Some(objects.allocator.clone().unwrap().as_apply_mutations())
            } else {
                objects.stores.get(&object_id).map(|x| x.clone() as Arc<dyn ApplyMutations>)
            }
        }
        .unwrap_or_else(|| self.root_store().lazy_open_store(object_id))
        .apply_mutation(mutation, replay)
        .await;
    }
/// The journaling system should call this when a mutation needs to be applied. |replay|
/// indicates whether this is for replay.  |checkpoint| indicates the location in the journal
/// file for this mutation and is used to keep track of each object's dependencies on the
/// journal.
The journaling system should call this when a mutation needs to be applied. |replay|
indicates whether this is for replay.  |checkpoint| indicates the location in the journal
file for this mutation and is used to keep track of each object's dependencies on the
journal.
The journaling system should call this when a mutation needs to be applied . |replay| indicates whether this is for replay . |checkpoint| indicates the location in the journal file for this mutation and is used to keep track of each object ' s dependencies on the journal .
pub async fn apply_mutation(
        &self,
        object_id: u64,
        mutation: Mutation,
        replay: bool,
        checkpoint: &JournalCheckpoint,
    ) {
        {
            let mut objects = self.objects.write().unwrap();
            objects.journal_file_checkpoints.entry(object_id).or_insert_with(|| checkpoint.clone());
            if object_id == objects.allocator_object_id {
                Some(objects.allocator.clone().unwrap().as_apply_mutations())
            } else {
                objects.stores.get(&object_id).map(|x| x.clone() as Arc<dyn ApplyMutations>)
            }
        }
        .unwrap_or_else(|| self.root_store().lazy_open_store(object_id))
        .apply_mutation(mutation, replay)
        .await;
    }
pub async fn apply_mutation ( & self , object_id : u64 , mutation : Mutation , replay : bool , checkpoint : & JournalCheckpoint , ) { { let mut objects = self . objects . write ( ) . unwrap ( ) ; objects . journal_file_checkpoints . entry ( object_id ) . or_insert_with ( | | checkpoint . clone ( ) ) ; if object_id == objects . allocator_object_id { Some ( objects . allocator . clone ( ) . unwrap ( ) . as_apply_mutations ( ) ) } else { objects . stores . get ( & object_id ) . map ( | x | x . clone ( ) as Arc < dyn ApplyMutations > ) } } . unwrap_or_else ( | | self . root_store ( ) . lazy_open_store ( object_id ) ) . apply_mutation ( mutation , replay ) . await ; }
The journaling system should call this when a mutation needs to be applied.
The journaling system should call this when a mutation needs to be applied .
&self
object_id
u64
mutation
Mutation
replay
bool
checkpoint
&JournalCheckpoint
&self
object_id
u64
mutation
Mutation
replay
bool
checkpoint
&JournalCheckpoint