From: Cyrill Gorcunov <gorcunov@gmail.com> To: tml <tarantool-patches@dev.tarantool.org> Subject: [Tarantool-patches] [PATCH] box/txn: do not zap fiber txn pointer before txn_write_to_wal completes Date: Fri, 24 Jan 2020 18:17:06 +0300 [thread overview] Message-ID: <20200124151706.18482-1-gorcunov@gmail.com> (raw) The txn_write_to_wal operates with txn by own: on success it calls txn_entry_done_cb which completes transaction, on error it calls txn_rollback which expects the transaction we're rolling back is the one the fiber carries in storage. | txn_write | fiber_set_txn(fiber(), NULL); // zap fiber's storage.txn | txn_write_to_wal(txn); | journal_entry_new(..., txn_entry_done_cb, ...) | if (req == NULL) | txn_rollback(txn); | assert(txn == in_txn()); // in_txn()=nil, triggers Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> --- Not for merging! I need to create a proper testcase with error injection. Sending it out for early review since I'm hunting another issue right now and this patch just to not loose the info. src/box/txn.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/box/txn.c b/src/box/txn.c index bedb57449..060d91536 100644 --- a/src/box/txn.c +++ b/src/box/txn.c @@ -583,7 +583,6 @@ txn_write(struct txn *txn) fiber_set_txn(fiber(), NULL); return 0; } - fiber_set_txn(fiber(), NULL); return txn_write_to_wal(txn); } -- 2.20.1
next reply other threads:[~2020-01-24 15:17 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-01-24 15:17 Cyrill Gorcunov [this message] 2020-01-24 15:24 ` Cyrill Gorcunov 2020-01-31 19:44 ` Konstantin Osipov 2020-01-31 19:57 ` Cyrill Gorcunov 2020-02-03 19:54 ` Georgy Kirichenko
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=20200124151706.18482-1-gorcunov@gmail.com \ --to=gorcunov@gmail.com \ --cc=tarantool-patches@dev.tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH] box/txn: do not zap fiber txn pointer before txn_write_to_wal completes' \ /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