fn on_write_prepare_finished(
        &mut self,
        cid: u64,
        cmd: Command,
        pr: ProcessResult,
        to_be_write: Vec<Modify>,
    ) {
        SCHED_STAGE_COUNTER_VEC
            .with_label_values(&[self.get_ctx_tag(cid), "write"])
            .inc();
        if to_be_write.is_empty() {
            return self.on_write_finished(cid, pr, Ok(()));
        }
        let engine_cb = make_engine_cb(cid, pr, self.schedch.clone());
        if let Err(e) = self.engine
            .async_write(cmd.get_context(), to_be_write, engine_cb)
        {
            SCHED_STAGE_COUNTER_VEC
                .with_label_values(&[self.get_ctx_tag(cid), "async_write_err"])
                .inc();
            self.finish_with_err(cid, Error::from(e));
        }
    }
/// Event handler for the success of write prepare.
///
/// Initiates an async write operation on the storage engine, there'll be a `WriteFinished`
/// message when it finishes.
Event handler for the success of write prepare.
Initiates an async write operation on the storage engine, there'll be a `WriteFinished`
message when it finishes.
Event handler for the success of write prepare . Initiates an async write operation on the storage engine there ' ll be a ` WriteFinished ` message when it finishes .
fn on_write_prepare_finished(
        &mut self,
        cid: u64,
        cmd: Command,
        pr: ProcessResult,
        to_be_write: Vec<Modify>,
    ) {
        SCHED_STAGE_COUNTER_VEC
            .with_label_values(&[self.get_ctx_tag(cid), "write"])
            .inc();
        if to_be_write.is_empty() {
            return self.on_write_finished(cid, pr, Ok(()));
        }
        let engine_cb = make_engine_cb(cid, pr, self.schedch.clone());
        if let Err(e) = self.engine
            .async_write(cmd.get_context(), to_be_write, engine_cb)
        {
            SCHED_STAGE_COUNTER_VEC
                .with_label_values(&[self.get_ctx_tag(cid), "async_write_err"])
                .inc();
            self.finish_with_err(cid, Error::from(e));
        }
    }
fn on_write_prepare_finished ( & mut self , cid : u64 , cmd : Command , pr : ProcessResult , to_be_write : Vec < Modify > , ) { SCHED_STAGE_COUNTER_VEC . with_label_values ( & [ self . get_ctx_tag ( cid ) , " " ] ) . inc ( ) ; if to_be_write . is_empty ( ) { return self . on_write_finished ( cid , pr , Ok ( ( ) ) ) ; } let engine_cb = make_engine_cb ( cid , pr , self . schedch . clone ( ) ) ; if let Err ( e ) = self . engine . async_write ( cmd . get_context ( ) , to_be_write , engine_cb ) { SCHED_STAGE_COUNTER_VEC . with_label_values ( & [ self . get_ctx_tag ( cid ) , " " ] ) . inc ( ) ; self . finish_with_err ( cid , Error :: from ( e ) ) ; } }
Event handler for the success of write prepare.
Event handler for the success of write prepare .
&mut self
cid
u64
cmd
Command
pr
ProcessResult
to_be_write
Vec<Modify>
&mut self
cid
u64
cmd
Command
pr
ProcessResult
to_be_write
Vec<Modify>