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 E69046EC40; Tue, 1 Jun 2021 10:37:17 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org E69046EC40 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1622533038; bh=IZZgY8C16HovihT3Tk4oNnsdHCemtUyzu/8V0CG4YqE=; h=To:References:Date:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=ByF38RGrm7zYD0ct2r9IsOyMdfpr1srvsaU2WnhSH/TU6tJdeUksscNZVAWqzgdZt UvAZhsC+iDAi1UhWR4P+oDroYPnpZ5QXXq1gIDZGysOb96rK88gmikmHujOzZpOuH9 sCgO8M3VxUhzxUuxGMLJI7wYLd2toiaWa8yReh3Q= Received: from smtp30.i.mail.ru (smtp30.i.mail.ru [94.100.177.90]) (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 A8B1A6EC40 for ; Tue, 1 Jun 2021 10:37:16 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org A8B1A6EC40 Received: by smtp30.i.mail.ru with esmtpa (envelope-from ) id 1lnyxf-0000V1-Up; Tue, 01 Jun 2021 10:37:16 +0300 To: Vladislav Shpilevoy , tarantool-patches@dev.tarantool.org, gorcunov@gmail.com References: <3dc7734c-a572-7f69-a6b8-ad5aa7536873@tarantool.org> Message-ID: <17dc11ec-123e-7f00-aff6-0e9170cfae1a@tarantool.org> Date: Tue, 1 Jun 2021 10:37:15 +0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.10.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD9D5B0DA836B685C549A9F97C297FFF2C725C7934AD8E7B4B9182A05F5380850401BE9A2E9D9B0C16C4DD9756D0315F9D7CB354C61C494F1A51096F31305396C68 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE79D9C320A40CA82D4EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006373ABD2822AD894AA78638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D880D64AB6ADFCFBE57F2C4FC9564EAEE1117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC0FC4FCDDD36A1EE6A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F44604297287769387670735200AC5B80A05675ACD618001F51B5FD3F9D2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EE0AC5B80A05675ACD1AB2475877E8919AD8FC6C240DEA7642DBF02ECDB25306B2B78CF848AE20165D0A6AB1C7CE11FEE31E44367C8E80A7B42D242C3BD2E3F4C6C4224003CC836476EA7A3FFF5B025636E2021AF6380DFAD1A18204E546F3947CB11811A4A51E3B096D1867E19FE1407959CC434672EE6371089D37D7C0E48F6C8AA50765F7900637EC0FE244295A6067EFF80C71ABB335746BA297DBC24807EABDAD6C7F3747799A X-C1DE0DAB: 0D63561A33F958A5C536E70821A47EAB000DD4ED2830419B1C62C4DDEB4B7AB2D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75FBC5FED0552DA851410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34B8CF715B894FC7110F336F0C196AD9690D9E0122F28C14419C1E37D939FD2F00F09F9D96FE8157FB1D7E09C32AA3244C48215A2763C45096C4B5D0DA158B42828894E9C85370243EFACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojt1KCq4WZgK6DAscx97bmuQ== X-Mailru-Sender: 583F1D7ACE8F49BD9DF7A8DAE6E2B08AD24852E8C038F0B483F8BBCB7FB0D5ABA57F2940040AB040424AE0EB1F3D1D21E2978F233C3FAE6EE63DB1732555E4A8EE80603BA4A5B0BC112434F685709FCF0DA7A0AF5A3A8387 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH 1/1] qsync: handle async txns right during CONFIRM 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: Serge Petrenko via Tarantool-patches Reply-To: Serge Petrenko Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" 28.05.2021 22:13, Vladislav Shpilevoy пишет: > Hi! Thanks for the review! > >>> diff --git a/src/box/txn_limbo.c b/src/box/txn_limbo.c >>> index f287369a2..05f0bf30a 100644 >>> --- a/src/box/txn_limbo.c >>> +++ b/src/box/txn_limbo.c >>> @@ -389,6 +389,27 @@ txn_limbo_read_confirm(struct txn_limbo *limbo, int64_t lsn) >>>                */ >>>               if (e->lsn == -1) >>>                   break; >>> +        } else if (e->txn->signature < 0) { >>> +            /* >>> +             * A transaction might be covered by the CONFIRM even if >>> +             * it is not written to WAL yet when it is an async >>> +             * transaction. It could be created just when the >>> +             * CONFIRM was being written to WAL. >>> +             */ >>> +            assert(e->txn->status == TXN_PREPARED); >>> +            /* >>> +             * Let it complete normally as a plain transaction. >>> +             */ >>> +            txn_clear_flags(e->txn, TXN_WAIT_SYNC | TXN_WAIT_ACK); >> AFAICS it's enough to clear WAIT_SYNC here. >> Asynchronous transactions never have WAIT_ACK set, do they? > Yes, sorry, I was in a big hurry when sent this patch. Fixed: > > ==================== > @@ -400,7 +400,7 @@ txn_limbo_read_confirm(struct txn_limbo *limbo, int64_t lsn) > /* > * Let it complete normally as a plain transaction. > */ > - txn_clear_flags(e->txn, TXN_WAIT_SYNC | TXN_WAIT_ACK); > + txn_clear_flags(e->txn, TXN_WAIT_SYNC); > txn_limbo_remove(limbo, e); Hi! Thanks for the fixes! LGTM. -- Serge Petrenko