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 A65AC6EC5D; Fri, 2 Apr 2021 01:25:31 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org A65AC6EC5D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1617315931; bh=HVMUmm6cJsAU59MQUmAEZ8EVXlr+JNnc+toAgZGe+6E=; 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=pjLKI0J2Nlhg8tBZeSHtu1Jgk6EbUIeA8PhlA7mg8W7wvIPOkGPBvFhZmEjpmlfWS Sc+M09KfpQetnB/fEQS81JZPc9zsEfC6Hf8iILZ0SYDHe4Bzgs3sXpfX0Q+6oonS7k bW43LkxprBthxkgruyvFG8wDqK7UgVte5mmD6h+U= Received: from smtp37.i.mail.ru (smtp37.i.mail.ru [94.100.177.97]) (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 AF8D86EC61 for ; Fri, 2 Apr 2021 01:23:48 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org AF8D86EC61 Received: by smtp37.i.mail.ru with esmtpa (envelope-from ) id 1lS5j9-0003d7-Jw; Fri, 02 Apr 2021 01:23:48 +0300 To: tarantool-patches@dev.tarantool.org, gorcunov@gmail.com, sergepetrenko@tarantool.org, korablev@tarantool.org Date: Fri, 2 Apr 2021 00:23:44 +0200 Message-Id: <399ad30c78b2767cc6fe14e0f3b42045e0334216.1617315744.git.v.shpilevoy@tarantool.org> 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: 4F1203BC0FB41BD9ED7173E37F4E32947A0146560F8BA70927CAA5B950F38D9F182A05F538085040DF84CA973D11704F6ACFADDE69329448E596BCA4295E8AEA27259F070E992FCF X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7E2331B2371EFE129EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637FD60A286D0BA57028638F802B75D45FF914D58D5BE9E6BC131B5C99E7648C95C7B5A45DDF210A4CF63E4C3B84C2BDD06530992026F9EDD46A471835C12D1D9774AD6D5ED66289B5278DA827A17800CE775D5B3C4A8F9BEC69FA2833FD35BB23D2EF20D2F80756B5F868A13BD56FB6657A471835C12D1D977725E5C173C3A84C39CFA8CFAC159CE19117882F4460429728AD0CFFFB425014E868A13BD56FB6657D81D268191BDAD3DC09775C1D3CA48CFD567B8734BE035A5BA3038C0950A5D36C8A9BA7A39EFB766EC990983EF5C0329BA3038C0950A5D36D5E8D9A59859A8B69635D6549439DA8176E601842F6C81A1F004C906525384307823802FF610243DF43C7A68FF6260569E8FC8737B5C2249EC8D19AE6D49635B68655334FD4449CB9ECD01F8117BC8BEAAAE862A0553A39223F8577A6DFFEA7CE1AEB6AF2DA18B6243847C11F186F3C59DAA53EE0834AAEE X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A24A6D60772A99906F8E1CD14B953EB46DF8D852FAE0F60CAF355D89D7DBCDD132 X-C1DE0DAB: C20DE7B7AB408E4181F030C43753B8183A4AFAF3EA6BDC44C234C8B12C006B7A503204626CAB286DFE78525DC5EFBE6289109C852E0DB951B1881A6453793CE9C32612AADDFBE061C61BE10805914D3804EBA3D8E7E5B87ABF8C51168CD8EBDB63AF70AF8205D7DCDC48ACC2A39D04F89CDFB48F4795C241BDAD6C7F3747799A X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34806D3522FB05EB395AE4BC3FB56FE636B902AB95E3F3B235B672684A5EBAF051ACE5FB523B91B2F21D7E09C32AA3244C5A0C4C30FD4B5CFF7EA7CBD0772F3655E8FBBEFAE1C4874C927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojiysexgWf334owxj23/mUig== X-Mailru-Sender: 504CC1E875BF3E7D9BC0E5172ADA3110FD186DCADF05FF8B10B08B707DEBD05B615C7E8934B3BD2207784C02288277CA03E0582D3806FB6A5317862B1921BA260ED6CFD6382C13A6112434F685709FCF0DA7A0AF5A3A8387 X-Mras: Ok Subject: [Tarantool-patches] [PATCH 3/3] box: remove is_local_recovery variable 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 used so as to recover synchronous auto-commit transactions in an async way (not blocking the fiber). But it became not necessary since #5874 was fixed. Because recovery does not use auto-commit transactions anymore. Closes #5194 --- src/box/box.cc | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/box/box.cc b/src/box/box.cc index f70a2bd0e..8eacbfebb 100644 --- a/src/box/box.cc +++ b/src/box/box.cc @@ -125,8 +125,6 @@ static struct gc_checkpoint_ref backup_gc; static bool is_box_configured = false; static bool is_ro = true; static fiber_cond ro_cond; -/** Set to true during recovery from local files. */ -static bool is_local_recovery = false; /** * The following flag is set if the instance failed to @@ -241,7 +239,6 @@ box_process_rw(struct request *request, struct space *space, goto rollback; if (is_autocommit) { - int res = 0; /* * During local recovery the commit procedure * should be async, otherwise the only fiber @@ -253,12 +250,7 @@ box_process_rw(struct request *request, struct space *space, * all during local recovery, since journal_write * is faked at this stage and returns immediately. */ - if (is_local_recovery) { - res = txn_commit_try_async(txn); - } else { - res = txn_commit(txn); - } - if (res < 0) + if (txn_commit(txn) < 0) goto error; fiber_gc(); } @@ -3037,7 +3029,6 @@ local_recovery(const struct tt_uuid *instance_uuid, memtx = (struct memtx_engine *)engine_by_name("memtx"); assert(memtx != NULL); - is_local_recovery = true; recovery_journal_create(&recovery->vclock); /* @@ -3096,7 +3087,6 @@ local_recovery(const struct tt_uuid *instance_uuid, } stream_guard.is_active = false; recovery_finalize(recovery); - is_local_recovery = false; /* * We must enable WAL before finalizing engine recovery, -- 2.24.3 (Apple Git-128)