Skip to content

Commit

Permalink
Move a fail point to workers
Browse files Browse the repository at this point in the history
Fix test_scheduler_leader_change_twice

Signed-off-by: Neil Shen <overvenus@gmail.com>
  • Loading branch information
overvenus committed Sep 10, 2018
1 parent e21cb62 commit 639701c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/storage/txn/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ impl Task {
pool_scheduler: PoolScheduler<SchedContext<E>>,
scheduler: worker::Scheduler<Msg>,
) {
fail_point!("scheduler_async_snapshot_finish");
debug!(
"receive snapshot finish msg for cid={}, cb_ctx={:?}",
self.cid, cb_ctx
Expand Down Expand Up @@ -218,6 +217,8 @@ impl Task {
let tag = cmd.tag();
if readcmd {
pool_scheduler.schedule(move |ctx: &mut SchedContext<E>| {
fail_point!("scheduler_async_snapshot_finish");

let _processing_read_timer = ctx
.processing_read_duration
.with_label_values(&[tag])
Expand All @@ -228,6 +229,8 @@ impl Task {
});
} else {
pool_scheduler.schedule(move |ctx: &mut SchedContext<E>| {
fail_point!("scheduler_async_snapshot_finish");

let _processing_write_timer = ctx
.processing_write_duration
.with_label_values(&[tag])
Expand Down

0 comments on commit 639701c

Please sign in to comment.