From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 8AA0E6EC55; Sat, 12 Jun 2021 00:57:08 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 8AA0E6EC55 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1623448628; bh=h/dLQLCggVMxjVDCBdsz+wsuZ1B9HfdNWCEmeckyUTE=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=Icr3VZ7BQPqUP1oQKEmNhhDSKPKW+SFMwfFZKsvhmRDVUcceY1rPcNruN20lmCt/h 2YMOZMp2qMGiRhbRZcw2O2jjrC5uqp+0D2yoRVRP3arez0Q+4DU3URTpfnmZ4tPT1Q 9R4nd4rapeghdxORiJEm9VwjR38kNP9C3NCu7wXg= Received: from smtpng3.m.smailru.net (smtpng3.m.smailru.net [94.100.177.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id BAFC86EC55 for ; Sat, 12 Jun 2021 00:56:20 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org BAFC86EC55 Received: by smtpng3.m.smailru.net with esmtpa (envelope-from ) id 1lrp8V-0008JK-Tv; Sat, 12 Jun 2021 00:56:20 +0300 To: tarantool-patches@dev.tarantool.org, gorcunov@gmail.com, sergepetrenko@tarantool.org Date: Fri, 11 Jun 2021 23:56:05 +0200 Message-Id: X-Mailer: git-send-email 2.24.3 (Apple Git-128) In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD9D5B0DA836B685C54F2E6026ACF3A18D093F1E8B1F5B66022182A05F538085040556AD0D8E76E6B076DEB83C0029E370ACFE63226973FEE74BF4EA264CE1F7F40 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE723A0121E4B9CF535EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F790063767A3307017EE919D8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D841365A7306A60E1109CA38A2E0BF2199117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCAA867293B0326636D2E47CDBA5A96583BD4B6F7A4D31EC0BC014FD901B82EE079FA2833FD35BB23D27C277FBC8AE2E8BAA867293B0326636D2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B6B1CFA6D474D4A6A4089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A2AD77751E876CB595E8F7B195E1C978317387390EF8EF124011447ED96C72CD2D X-C1DE0DAB: C20DE7B7AB408E4181F030C43753B8186998911F362727C414F749A5E30D975C8874A2D3FA5089FE66A53293B3D1A6D3B0D98AE78EDDA6A59C2B6934AE262D3EE7EAB7254005DCED7532B743992DF240BDC6A1CF3F042BAD6DF99611D93F60EF31C0090ACECF247D699F904B3F4130E343918A1A30D5E7FCCB5012B2E24CD356 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34EE6683D9E546CC62D7E8F7C6D5197792DD0A225F9A6CBE88BD3347E2BEAB81ABA6D625C9437577CE1D7E09C32AA3244C68501314758F37791095E67226827CFF60759606DA2E136AFACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojQR1NM653rVG/FowFMdheaQ== X-Mailru-Sender: 689FA8AB762F73936BC43F508A0638229A58B154BD9206336B915CD09DDF1DA23841015FED1DE5223CC9A89AB576DD93FB559BB5D741EB963CF37A108A312F5C27E8A8C3839CE0E267EA787935ED9F1B X-Mras: Ok Subject: [Tarantool-patches] [PATCH 01/13] error: introduce ER_CASCADE_ROLLBACK X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Vladislav Shpilevoy via Tarantool-patches Reply-To: Vladislav Shpilevoy Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" 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)