diff --git a/src/box/applier.cc b/src/box/applier.cc index fbb452dc0e2a..635a9849c545 100644 --- a/src/box/applier.cc +++ b/src/box/applier.cc @@ -155,11 +155,9 @@ applier_writer_f(va_list ap) * replication_timeout seconds any more. */ if (applier->version_id >= version_id(1, 7, 7)) - fiber_cond_wait_timeout(&applier->writer_cond, - TIMEOUT_INFINITY); + fiber_yield_timeout(TIMEOUT_INFINITY); else - fiber_cond_wait_timeout(&applier->writer_cond, - replication_timeout); + fiber_yield_timeout(replication_timeout); /* * A writer fiber is going to be awaken after a commit or * a heartbeat message. So this is an appropriate place to @@ -928,7 +926,7 @@ applier_on_commit(struct trigger *trigger, void *event) { (void) event; struct applier *applier = (struct applier *)trigger->data; - fiber_cond_signal(&applier->writer_cond); + fiber_wakeup(applier->writer); return 0; } @@ -1093,7 +1091,7 @@ applier_subscribe(struct applier *applier) */ if (stailq_first_entry(&rows, struct applier_tx_row, next)->row.lsn == 0) - fiber_cond_signal(&applier->writer_cond); + fiber_wakeup(applier->writer); else if (applier_apply_tx(&rows) != 0) diag_raise(); @@ -1289,7 +1287,6 @@ applier_new(const char *uri) applier->last_row_time = ev_monotonic_now(loop()); rlist_create(&applier->on_state); fiber_cond_create(&applier->resume_cond); - fiber_cond_create(&applier->writer_cond); diag_create(&applier->diag); return applier; diff --git a/src/box/applier.h b/src/box/applier.h index c9fdc2955f09..4f8bee84e5c5 100644 --- a/src/box/applier.h +++ b/src/box/applier.h @@ -78,8 +78,6 @@ struct applier { struct fiber *reader; /** Background fiber to reply with vclock */ struct fiber *writer; - /** Writer cond. */ - struct fiber_cond writer_cond; /** Finite-state machine */ enum applier_state state; /** Local time of this replica when the last row has been received */