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 8F9AD6F852; Sat, 6 Nov 2021 02:56:46 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 8F9AD6F852 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1636156606; bh=nEwQMvvksoNFx9tUopIH3Xe/YYzK2oqDi1UHcmLCDIc=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=vZFJZSsanjVjlAFcUbVxmSEttxLXNOu9F6tnKXPaop2bR1zfB/OCAV+UQZgYSu/zf 4MO/jxgZNrs7mlx61JAfevNGeVgyTLD1ujmNv6KOTF5xzksQ11P7v4iyR0G62J02Fv 7nm8XSKQ4DIR+8qnoZ8ygsyViA8ShxvjFRazpluk= Received: from smtpng3.i.mail.ru (smtpng3.i.mail.ru [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 5C27D6F3E5 for ; Sat, 6 Nov 2021 02:56:43 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 5C27D6F3E5 Received: by smtpng3.m.smailru.net with esmtpa (envelope-from ) id 1mj94b-0006s6-Qr; Sat, 06 Nov 2021 02:56:42 +0300 To: tarantool-patches@dev.tarantool.org, sergepetrenko@tarantool.org, vdavydov@tarantool.org Date: Sat, 6 Nov 2021 00:56:31 +0100 Message-Id: X-Mailer: git-send-email 2.24.3 (Apple Git-128) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9F9D976862A30D4FE24BA5635EEB592969D7326BCF5538DC0182A05F5380850401B54EB9FAEB5E56CDEE23E74794E30D94A928205326C10995CB430CEED3E6ED8 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7544B1CCE26E01C74EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F790063745476ED688D943148638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8189998ED4ED57C636E690FF6E6C90B54117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCECADA55FE5B58BB7A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F44604297287769387670735201E561CDFBCA1751FF04B652EEC242312D2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B62CFFCC7B69C47339089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-C1DE0DAB: C20DE7B7AB408E4181F030C43753B8186998911F362727C414F749A5E30D975C7E8FD95C1B0C506B8F777D7CFDAC3A5894410649676FD8FB9C2B6934AE262D3EE7EAB7254005DCEDEEDC9C70C0CB2EC61E0A4E2319210D9B64D260DF9561598F01A9E91200F654B0AEA200A0D3D80EA68E8E86DC7131B365E7726E8460B7C23C X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34F38194B2C99DC128207320E2926EE325DEBDA00FBAA967FE2F6FE631429AA2368AF1E01F5FDBA5571D7E09C32AA3244CEA4A4C6DE71944E495809DC7CE2BC1543A76366E8A9DE7CAFACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2bioj75A/c671lqWuyIjvjd3suQ== X-Mailru-Sender: 689FA8AB762F7393C37E3C1AEC41BA5DE5D27DCE844188C5DD17D71D5536D4763841015FED1DE5223CC9A89AB576DD93FB559BB5D741EB963CF37A108A312F5C27E8A8C3839CE0E267EA787935ED9F1B X-Mras: Ok Subject: [Tarantool-patches] [PATCH 0/9] ER_READONLY reason 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" Branch: http://github.com/tarantool/tarantool/tree/gerold103/gh-5568-err-readonly-reason Issue: https://github.com/tarantool/tarantool/issues/5568 Vladislav Shpilevoy (9): diag: return created error from diag_set() error: introduce error_payload error: move code to struct error from ClientError error: use error_payload to store optional members error: use error_payload in MessagePack codecs error: use error_payload in Lua luatest: copy config in cluster:build_server() luatest: add new helpers for 'server' object box: enrich ER_READONLY with new details .../unreleased/gh-5568-readonly-reason.md | 24 + extra/exports | 3 +- src/box/box.cc | 56 ++- src/box/error.cc | 57 +-- src/box/error.h | 60 +-- src/box/index.cc | 4 +- src/box/mp_error.cc | 197 +++----- src/lib/core/CMakeLists.txt | 1 + src/lib/core/diag.c | 26 +- src/lib/core/diag.h | 94 +++- src/lib/core/error_payload.c | 282 +++++++++++ src/lib/core/error_payload.h | 166 +++++++ src/lib/core/exception.cc | 8 +- src/lib/core/exception.h | 66 +++ src/lib/uuid/mp_uuid.c | 40 ++ src/lib/uuid/tt_uuid.h | 33 ++ src/lua/error.lua | 84 ++-- src/lua/init.lua | 24 - test/box/error.result | 4 +- test/box/error.test.lua | 2 +- test/engine/func_index.result | 3 +- test/luatest_helpers/cluster.lua | 1 + test/luatest_helpers/server.lua | 64 ++- .../gh_5568_read_only_reason_test.lua | 287 +++++++++++ test/unit/CMakeLists.txt | 2 + test/unit/error.c | 461 ++++++++++++++++++ test/unit/error.result | 160 ++++++ test/unit/mp_error.cc | 78 ++- test/unit/mp_error.result | 27 +- 29 files changed, 1970 insertions(+), 344 deletions(-) create mode 100644 changelogs/unreleased/gh-5568-readonly-reason.md create mode 100644 src/lib/core/error_payload.c create mode 100644 src/lib/core/error_payload.h create mode 100644 test/replication-luatest/gh_5568_read_only_reason_test.lua create mode 100644 test/unit/error.c create mode 100644 test/unit/error.result -- 2.24.3 (Apple Git-128)