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] qsync: sanitize txn_limbo_on_rollback Date: Fri, 10 Jul 2020 10:56:05 +0300 [thread overview] Message-ID: <20200710075605.217824-6-gorcunov@gmail.com> (raw) In-Reply-To: <20200710075605.217824-1-gorcunov@gmail.com> - no need to explicit cast from void - shrink changing condition - drop unneed reference to event Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> --- src/box/txn.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/box/txn.c b/src/box/txn.c index feb9a10c6..6cd2a346e 100644 --- a/src/box/txn.c +++ b/src/box/txn.c @@ -691,13 +691,12 @@ txn_commit_nop(struct txn *txn) static int txn_limbo_on_rollback(struct trigger *trig, void *event) { - (void) event; - struct txn *txn = (struct txn *) event; + struct txn *txn = event; /* Check whether limbo has performed the cleanup. */ - if (txn->signature != TXN_SIGNATURE_ROLLBACK) - return 0; - struct txn_limbo_entry *entry = (struct txn_limbo_entry *) trig->data; - txn_limbo_abort(&txn_limbo, entry); + if (txn->signature == TXN_SIGNATURE_ROLLBACK) { + struct txn_limbo_entry *e = trig->data; + txn_limbo_abort(&txn_limbo, e); + } return 0; } -- 2.26.2
next prev parent reply other threads:[~2020-07-10 7:57 UTC|newest] Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-07-10 7:56 [Tarantool-patches] [PATCH 0/5] qsync: code cleanup Cyrill Gorcunov 2020-07-10 7:56 ` [Tarantool-patches] [PATCH 1/5] qsync: eliminate redundant writes Cyrill Gorcunov 2020-07-10 20:31 ` Vladislav Shpilevoy 2020-07-10 21:04 ` Cyrill Gorcunov 2020-07-10 7:56 ` [Tarantool-patches] [PATCH 2/5] qsync: add a comment about sync txn in journal allocation Cyrill Gorcunov 2020-07-10 20:33 ` Vladislav Shpilevoy 2020-07-10 20:34 ` Vladislav Shpilevoy 2020-07-10 21:07 ` Cyrill Gorcunov 2020-07-10 21:08 ` Vladislav Shpilevoy 2020-07-11 16:08 ` Vladislav Shpilevoy 2020-07-10 7:56 ` [Tarantool-patches] [PATCH 3/5] qsync: txn_commit_async -- drop redundant variable Cyrill Gorcunov 2020-07-10 20:35 ` Vladislav Shpilevoy 2020-07-10 21:10 ` Cyrill Gorcunov 2020-07-10 21:28 ` Vladislav Shpilevoy 2020-07-10 21:36 ` Cyrill Gorcunov 2020-07-11 14:10 ` Vladislav Shpilevoy 2020-07-11 15:18 ` Cyrill Gorcunov 2020-07-10 7:56 ` [Tarantool-patches] [PATCH 4/5] qsync: txn_commit -- use txn flag instead of caching variable Cyrill Gorcunov 2020-07-10 20:36 ` Vladislav Shpilevoy 2020-07-10 21:27 ` Cyrill Gorcunov 2020-07-10 7:56 ` Cyrill Gorcunov [this message] 2020-07-10 20:38 ` [Tarantool-patches] [PATCH 5/5] qsync: sanitize txn_limbo_on_rollback Vladislav Shpilevoy 2020-07-11 15:46 ` Cyrill Gorcunov
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=20200710075605.217824-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] qsync: sanitize txn_limbo_on_rollback' \ /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