From: Serge Petrenko <sergepetrenko@tarantool.org>
To: v.shpilevoy@tarantool.org, gorcunov@gmail.com
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH 4/4] txn_limbo: add ROLLBACK processing
Date: Fri, 19 Jun 2020 20:53:56 +0300 [thread overview]
Message-ID: <602ad0b8-41a7-077a-b9cc-c2f11a740195@tarantool.org> (raw)
In-Reply-To: <16c9d1ffb9d09bb2b2f206a23973e2734616c345.1592482315.git.sergepetrenko@tarantool.org>
18.06.2020 15:14, Serge Petrenko пишет:
> Now txn_limbo writes a ROLLBACK entry to WAL when one of the limbo
> entries fails to gather quorum during a txn_limbo_confirm_timeout.
> All the limbo entries, starting with the failed one, are rolled back in
> reverse order.
>
> Closes #4848
Added a new commit:
commit c3c3d6739add2d26b45e6ba0fd571b502b125c57
Author: Serge Petrenko <sergepetrenko@tarantool.org>
Date: Fri Jun 19 08:30:43 2020 +0300
Fix ROLLBACK handling during recovery and in row encoding
[TO BE SQUASHED INTO THE PREVIOUS COMMIT]
diff --git a/src/box/box.cc b/src/box/box.cc
index 23c5aed95..8ba7ffafb 100644
--- a/src/box/box.cc
+++ b/src/box/box.cc
@@ -343,7 +343,7 @@ apply_wal_row(struct xstream *stream, struct
xrow_header *row)
{
struct request request;
// TODO: process confirmation during recovery.
- if (row->type == IPROTO_CONFIRM)
+ if (iproto_type_is_synchro_request(row->type))
return;
xrow_decode_dml_xc(row, &request, dml_request_key_map(row->type));
if (request.type != IPROTO_NOP) {
diff --git a/src/box/txn.c b/src/box/txn.c
index 52e1c36dd..2360ecae3 100644
--- a/src/box/txn.c
+++ b/src/box/txn.c
@@ -83,10 +83,10 @@ txn_add_redo(struct txn *txn, struct txn_stmt *stmt,
struct request *request)
struct space *space = stmt->space;
row->group_id = space != NULL ? space_group_id(space) : 0;
/*
- * IPROTO_CONFIRM entries are supplementary and aren't
- * valid dml requests. They're encoded manually.
+ * Sychronous replication entries are supplementary and
+ * aren't valid dml requests. They're encoded manually.
*/
- if (likely(row->type != IPROTO_CONFIRM))
+ if (likely(!iproto_type_is_synchro_request(row->type)))
row->bodycnt = xrow_encode_dml(request, &txn->region,
row->body);
if (row->bodycnt < 0)
return -1;
> * Return TRUE if limbo is empty.
> */
--
Serge Petrenko
next prev parent reply other threads:[~2020-06-19 17:53 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-18 12:13 [Tarantool-patches] [PATCH 0/4] sync replication: add rollback processing Serge Petrenko
2020-06-18 12:14 ` [Tarantool-patches] [PATCH 1/4] xrow: fix comment typo Serge Petrenko
2020-06-18 22:15 ` Vladislav Shpilevoy
2020-06-18 22:15 ` Vladislav Shpilevoy
2020-06-19 17:28 ` Serge Petrenko
2020-06-18 12:14 ` [Tarantool-patches] [PATCH 2/4] xrow: add ability to encode/decode ROLLBACK requests Serge Petrenko
2020-06-18 14:46 ` Cyrill Gorcunov
2020-06-19 17:30 ` Serge Petrenko
2020-06-18 12:14 ` [Tarantool-patches] [PATCH 3/4] txn_limbo: add timeout when waiting for acks Serge Petrenko
2020-06-18 12:14 ` [Tarantool-patches] [PATCH 4/4] txn_limbo: add ROLLBACK processing Serge Petrenko
2020-06-18 22:15 ` Vladislav Shpilevoy
2020-06-19 17:35 ` Serge Petrenko
2020-06-21 15:53 ` Vladislav Shpilevoy
2020-06-19 17:53 ` Serge Petrenko [this message]
2020-06-23 8:37 ` Serge Petrenko
2020-06-25 22:14 ` Vladislav Shpilevoy
2020-06-25 22:43 ` 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=602ad0b8-41a7-077a-b9cc-c2f11a740195@tarantool.org \
--to=sergepetrenko@tarantool.org \
--cc=gorcunov@gmail.com \
--cc=tarantool-patches@dev.tarantool.org \
--cc=v.shpilevoy@tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH 4/4] txn_limbo: add ROLLBACK processing' \
/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