From: Vladislav Shpilevoy via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: tarantool-patches@dev.tarantool.org, gorcunov@gmail.com,
sergepetrenko@tarantool.org
Subject: [Tarantool-patches] [PATCH 01/13] error: introduce ER_CASCADE_ROLLBACK
Date: Fri, 11 Jun 2021 23:56:05 +0200 [thread overview]
Message-ID: <c280876d19f264724d2dd8eeb1d6c9b953369742.1623448465.git.v.shpilevoy@tarantool.org> (raw)
In-Reply-To: <cover.1623448465.git.v.shpilevoy@tarantool.org>
It was called ER_CHECKPOINT_ROLLBACK but was set only when there
is a cascade rollback in WAL.
The new error name is going to be used in the next patches, where
not only checkpoint can fail due to a cascade rollback.
Part of #6027
---
src/box/errcode.h | 2 +-
src/box/wal.c | 8 ++++----
test/box/errinj.result | 2 +-
test/box/error.result | 2 +-
4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/box/errcode.h b/src/box/errcode.h
index d93820e96..b143e91d9 100644
--- a/src/box/errcode.h
+++ b/src/box/errcode.h
@@ -186,7 +186,7 @@ struct errcode_record {
/*131 */_(ER_INVALID_INDEX_FILE, "Invalid INDEX file %s: %s") \
/*132 */_(ER_INVALID_RUN_FILE, "Invalid RUN file: %s") \
/*133 */_(ER_INVALID_VYLOG_FILE, "Invalid VYLOG file: %s") \
- /*134 */_(ER_CHECKPOINT_ROLLBACK, "Can't start a checkpoint while in cascading rollback") \
+ /*134 */_(ER_CASCADE_ROLLBACK, "WAL has a rollback in progress") \
/*135 */_(ER_VY_QUOTA_TIMEOUT, "Timed out waiting for Vinyl memory quota") \
/*136 */_(ER_PARTIAL_KEY, "%s index does not support selects via a partial key (expected %u parts, got %u). Please Consider changing index type to TREE.") \
/*137 */_(ER_TRUNCATE_SYSTEM_SPACE, "Can't truncate a system space, space '%s'") \
diff --git a/src/box/wal.c b/src/box/wal.c
index 63ff5584a..5c52142ef 100644
--- a/src/box/wal.c
+++ b/src/box/wal.c
@@ -606,7 +606,7 @@ wal_sync_f(struct cbus_call_msg *data)
struct wal_writer *writer = &wal_writer_singleton;
if (writer->is_in_rollback) {
/* We're rolling back a failed write. */
- diag_set(ClientError, ER_WAL_IO);
+ diag_set(ClientError, ER_CASCADE_ROLLBACK);
return -1;
}
vclock_copy(&msg->vclock, &writer->vclock);
@@ -629,7 +629,7 @@ wal_sync(struct vclock *vclock)
}
if (!stailq_empty(&writer->rollback)) {
/* We're rolling back a failed write. */
- diag_set(ClientError, ER_WAL_IO);
+ diag_set(ClientError, ER_CASCADE_ROLLBACK);
return -1;
}
bool cancellable = fiber_set_cancellable(false);
@@ -653,7 +653,7 @@ wal_begin_checkpoint_f(struct cbus_call_msg *data)
* can't make a checkpoint - see the comment
* in wal_begin_checkpoint() for the explanation.
*/
- diag_set(ClientError, ER_CHECKPOINT_ROLLBACK);
+ diag_set(ClientError, ER_CASCADE_ROLLBACK);
return -1;
}
/*
@@ -691,7 +691,7 @@ wal_begin_checkpoint(struct wal_checkpoint *checkpoint)
* the snapshot. So we abort checkpointing in this
* case.
*/
- diag_set(ClientError, ER_CHECKPOINT_ROLLBACK);
+ diag_set(ClientError, ER_CASCADE_ROLLBACK);
return -1;
}
bool cancellable = fiber_set_cancellable(false);
diff --git a/test/box/errinj.result b/test/box/errinj.result
index 44ecafc40..43daf5f0f 100644
--- a/test/box/errinj.result
+++ b/test/box/errinj.result
@@ -898,7 +898,7 @@ box.schema.user.revoke('guest', 'read', 'space', '_space')
...
run()
---
-- error: Can't start a checkpoint while in cascading rollback
+- error: WAL has a rollback in progress
...
ch:get()
---
diff --git a/test/box/error.result b/test/box/error.result
index cc8cbaaa9..6ef099153 100644
--- a/test/box/error.result
+++ b/test/box/error.result
@@ -353,7 +353,7 @@ t;
| 131: box.error.INVALID_INDEX_FILE
| 132: box.error.INVALID_RUN_FILE
| 133: box.error.INVALID_VYLOG_FILE
- | 134: box.error.CHECKPOINT_ROLLBACK
+ | 134: box.error.CASCADE_ROLLBACK
| 135: box.error.VY_QUOTA_TIMEOUT
| 136: box.error.PARTIAL_KEY
| 137: box.error.TRUNCATE_SYSTEM_SPACE
--
2.24.3 (Apple Git-128)
next prev parent reply other threads:[~2021-06-11 21:57 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-11 21:56 [Tarantool-patches] [PATCH 00/13] Applier rollback reason Vladislav Shpilevoy via Tarantool-patches
2021-06-11 21:56 ` Vladislav Shpilevoy via Tarantool-patches [this message]
2021-06-11 21:56 ` [Tarantool-patches] [PATCH 10/13] txn: install proper diag errors on txn fail Vladislav Shpilevoy via Tarantool-patches
2021-06-11 21:56 ` [Tarantool-patches] [PATCH 11/13] wal: introduce JOURNAL_ENTRY_ERR_CASCADE Vladislav Shpilevoy via Tarantool-patches
2021-06-11 21:56 ` [Tarantool-patches] [PATCH 12/13] txn: introduce TXN_SIGNATURE_ABORT Vladislav Shpilevoy via Tarantool-patches
2021-06-11 21:56 ` [Tarantool-patches] [PATCH 13/13] txn: stop TXN_SIGNATURE_ABORT override Vladislav Shpilevoy via Tarantool-patches
2021-06-15 13:44 ` Serge Petrenko via Tarantool-patches
2021-06-15 19:34 ` Vladislav Shpilevoy via Tarantool-patches
2021-06-11 21:56 ` [Tarantool-patches] [PATCH 02/13] test: remove replica-applier-rollback.lua Vladislav Shpilevoy via Tarantool-patches
2021-06-11 21:56 ` [Tarantool-patches] [PATCH 03/13] journal: make journal_write() set diag on error Vladislav Shpilevoy via Tarantool-patches
2021-06-11 21:56 ` [Tarantool-patches] [PATCH 04/13] wal: refactor wal_write_to_disk() Vladislav Shpilevoy via Tarantool-patches
2021-06-15 20:46 ` Cyrill Gorcunov via Tarantool-patches
2021-06-16 6:22 ` Vladislav Shpilevoy via Tarantool-patches
2021-06-16 8:02 ` Cyrill Gorcunov via Tarantool-patches
2021-06-16 23:32 ` Vladislav Shpilevoy via Tarantool-patches
2021-06-11 21:56 ` [Tarantool-patches] [PATCH 05/13] diag: introduce diag_set_detailed() Vladislav Shpilevoy via Tarantool-patches
2021-06-11 21:56 ` [Tarantool-patches] [PATCH 06/13] wal: encapsulate ER_WAL_IO Vladislav Shpilevoy via Tarantool-patches
2021-06-11 21:56 ` [Tarantool-patches] [PATCH 07/13] txn: change limbo rollback check in the trigger Vladislav Shpilevoy via Tarantool-patches
2021-06-11 21:56 ` [Tarantool-patches] [PATCH 08/13] journal: introduce proper error codes Vladislav Shpilevoy via Tarantool-patches
2021-06-11 21:56 ` [Tarantool-patches] [PATCH 09/13] txn: assert after WAL write that txn is not done Vladislav Shpilevoy via Tarantool-patches
2021-06-15 13:43 ` [Tarantool-patches] [PATCH 00/13] Applier rollback reason Serge Petrenko via Tarantool-patches
2021-06-16 23:32 ` Vladislav Shpilevoy via Tarantool-patches
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=c280876d19f264724d2dd8eeb1d6c9b953369742.1623448465.git.v.shpilevoy@tarantool.org \
--to=tarantool-patches@dev.tarantool.org \
--cc=gorcunov@gmail.com \
--cc=sergepetrenko@tarantool.org \
--cc=v.shpilevoy@tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH 01/13] error: introduce ER_CASCADE_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