From f87519d9a9fd4c414bad8b6ba9958c1a4d1b8798 Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov <gorcunov@gmail.com> Date: Wed, 18 Mar 2020 17:41:03 +0300 Subject: [PATCH] box/txn: rename txn_entry_complete_cb to txn_complete_async We will use this function inside wal engine right after journal redesign is complete. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> --- src/box/txn.c | 8 ++++---- src/box/txn.h | 7 +++++++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/box/txn.c b/src/box/txn.c index 7a2a4877ee..60da5b5643 100644 --- a/src/box/txn.c +++ b/src/box/txn.c @@ -462,10 +462,10 @@ txn_complete(struct txn *txn) } } -static void -txn_entry_complete_cb(struct journal_entry *entry, void *data) +void +txn_complete_async(struct journal_entry *entry, void *complete_data) { - struct txn *txn = data; + struct txn *txn = complete_data; txn->signature = entry->res; /* * Some commit/rollback triggers require for in_txn fiber @@ -487,7 +487,7 @@ txn_write_to_wal(struct txn *txn) struct journal_entry *req = journal_entry_new(txn->n_new_rows + txn->n_applier_rows, &txn->region, - txn_entry_complete_cb, + txn_complete_async, txn); if (req == NULL) { txn_rollback(txn); diff --git a/src/box/txn.h b/src/box/txn.h index b950e2e188..572c76d840 100644 --- a/src/box/txn.h +++ b/src/box/txn.h @@ -44,6 +44,7 @@ extern "C" { /** box statistics */ extern struct rmean *rmean_box; +struct journal_entry; struct engine; struct space; struct tuple; @@ -287,6 +288,12 @@ txn_commit(struct txn *txn); void txn_rollback(struct txn *txn); +/** + * Complete asynchronous transaction. + */ +void +txn_complete_async(struct journal_entry *entry, void *complete_data); + /** * Submit a transaction to the journal. * @pre txn == in_txn() -- GitLab