From: Cyrill Gorcunov <gorcunov@gmail.com> To: tml <tarantool-patches@dev.tarantool.org> Cc: Vladislav Shpilevoy <v.shpilevoy@tarantool.org> Subject: [Tarantool-patches] [PATCH 5/5] txn: use txn_set_flag Date: Fri, 26 Jun 2020 17:52:27 +0300 [thread overview] Message-ID: <20200626145227.1507426-6-gorcunov@gmail.com> (raw) In-Reply-To: <20200626145227.1507426-1-gorcunov@gmail.com> To operate with flags we've three helpers: _set, _clear and _has. No need for additional wrapper. Same time it is more convenient to grep for TXN_FORCE_ASYNC directly. In-scope-of #4842 Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> --- src/box/applier.cc | 4 ++-- src/box/txn.h | 10 ---------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/box/applier.cc b/src/box/applier.cc index 2d1047d43..04b557051 100644 --- a/src/box/applier.cc +++ b/src/box/applier.cc @@ -219,7 +219,7 @@ apply_snapshot_row(struct xrow_header *row) * Do not wait for confirmation when fetching a snapshot. * Master only sends confirmed rows during join. */ - txn_force_async(txn); + txn_set_flag(txn, TXN_FORCE_ASYNC); if (txn_begin_stmt(txn, space) != 0) goto rollback; /* no access checks here - applier always works with admin privs */ @@ -336,7 +336,7 @@ apply_final_join_row(struct xrow_header *row) * Do not wait for confirmation while processing final * join rows. See apply_snapshot_row(). */ - txn_force_async(txn); + txn_set_flag(txn, TXN_FORCE_ASYNC); if (apply_row(row) != 0) { txn_rollback(txn); fiber_gc(); diff --git a/src/box/txn.h b/src/box/txn.h index d10c51f0f..c631d7033 100644 --- a/src/box/txn.h +++ b/src/box/txn.h @@ -287,16 +287,6 @@ txn_clear_flag(struct txn *txn, enum txn_flag flag) txn->flags &= ~(1 << flag); } -/** - * Force async mode for transaction. It won't wait for acks - * or confirmation. - */ -static inline void -txn_force_async(struct txn *txn) -{ - txn_set_flag(txn, TXN_FORCE_ASYNC); -} - /* Pointer to the current transaction (if any) */ static inline struct txn * in_txn(void) -- 2.26.2
next prev parent reply other threads:[~2020-06-26 14:53 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-06-26 14:52 [Tarantool-patches] [PATCH 0/5] qsync: Cleanups during review Cyrill Gorcunov 2020-06-26 14:52 ` [Tarantool-patches] [PATCH 1/5] iproto: drop unused iproto_type_is_sync Cyrill Gorcunov 2020-06-26 14:52 ` [Tarantool-patches] [PATCH 2/5] iproto: drop unused iproto_type_is_select Cyrill Gorcunov 2020-06-26 14:52 ` [Tarantool-patches] [PATCH 3/5] iproto: drop unused iproto_type_is_request Cyrill Gorcunov 2020-06-26 14:52 ` [Tarantool-patches] [PATCH 4/5] journal: drop unused destroy method Cyrill Gorcunov 2020-06-26 14:52 ` Cyrill Gorcunov [this message] 2020-06-26 14:55 ` [Tarantool-patches] [PATCH 0/5] qsync: Cleanups during review Cyrill Gorcunov 2020-06-28 16:55 ` Vladislav Shpilevoy 2020-06-29 20:37 ` Vladislav Shpilevoy
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200626145227.1507426-6-gorcunov@gmail.com \ --to=gorcunov@gmail.com \ --cc=tarantool-patches@dev.tarantool.org \ --cc=v.shpilevoy@tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH 5/5] txn: use txn_set_flag' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox