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 04D8A6EC58; Fri, 28 May 2021 22:13:58 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 04D8A6EC58 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1622229238; bh=erMG5lwS3ez7U6VJIkG6laMr0yc1jbQ0EtBQ6MtwxEY=; h=To:Cc:References:Date:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=vjs1+jFNGh2O2jGQux0zX/Pj2WX0o7QYioztSQ+8pB969qm4gbBWmhuOSsB2lIatk X337EbkhQnQrLnl1cLAVm1kGI4MoPAAEe5WefuF3X3zSfFwkWtLILkVYA1dQG2W39O 1x4Z9NIM1RoV7MeZmL2/Wp1+LnzUHy7/BIO6n550= Received: from smtp48.i.mail.ru (smtp48.i.mail.ru [94.100.177.108]) (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 9C1706EC5F for ; Fri, 28 May 2021 22:13:23 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 9C1706EC5F Received: by smtp48.i.mail.ru with esmtpa (envelope-from ) id 1lmhv9-0001NQ-4R; Fri, 28 May 2021 22:13:23 +0300 To: Cyrill Gorcunov Cc: tarantool-patches@dev.tarantool.org References: Message-ID: <89fb524d-17c7-11b4-7276-8e8a06503769@tarantool.org> Date: Fri, 28 May 2021 21:13:22 +0200 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 Content-Language: en-US Content-Transfer-Encoding: 7bit X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9157EECD0FDB90B9A7712F917240E18A5E40D698B3575A0AC00894C459B0CD1B91E77C3F1E87A3A3A4B393A282F6B8DEF14D1348FF9502AB9B6BD4AB1FA1FD0A3 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7D6964C9E324ABA58EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637457C2806CBF873EDEA1F7E6F0F101C6723150C8DA25C47586E58E00D9D99D84E1BDDB23E98D2D38BD6CF32B5F8F9D4048B38CF31A4A68CB770BBB1320468BEB9CC7F00164DA146DAFE8445B8C89999728AA50765F790063741F7343E26298569389733CBF5DBD5E9C8A9BA7A39EFB766F5D81C698A659EA7CC7F00164DA146DA9985D098DBDEAEC8735DFC8FA7AC1207F6B57BC7E6449061A352F6E88A58FB86F5D81C698A659EA73AA81AA40904B5D9A18204E546F3947CDA532D2019E286A72D242C3BD2E3F4C64AD6D5ED66289B52698AB9A7B718F8C46E0066C2D8992A16725E5C173C3A84C3C4F5CE151AFA0028BA3038C0950A5D36B5C8C57E37DE458B0BC6067A898B09E46D1867E19FE14079C09775C1D3CA48CF3D321E7403792E342EB15956EA79C166A417C69337E82CC275ECD9A6C639B01B78DA827A17800CE7E1BCFB2C0BE3F189731C566533BA786AA5CC5B56E945C8DA X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A2368A440D3B0F6089093C9A16E5BC824A2A04A2ABAA09D25379311020FFC8D4ADC5620285EC0EEAEF6DB535E0533142D9 X-C1DE0DAB: 0D63561A33F958A515BC2FF7B973507D5B6DE184AA806651B50268A9C08E676FD59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA752FA4FC647EE431D9410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34AF61ACC197BF517AC1E21107422A7D3A0C257576DE75F9205AD0EFEDCAB0C230E40C1511C4EF150B1D7E09C32AA3244C64B585A296DE99BDD8B0E8A9AF95EC02A95CA90A1D8AC565729B2BEF169E0186 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojrzEAfVgW/77hy3eZGEpVVg== X-Mailru-Sender: 504CC1E875BF3E7D9BC0E5172ADA311021F6370E1F32FF70D614269CD2B4840CE47BF96CE5486A3307784C02288277CA03E0582D3806FB6A5317862B1921BA260ED6CFD6382C13A6112434F685709FCF0DA7A0AF5A3A8387 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: Vladislav Shpilevoy via Tarantool-patches Reply-To: Vladislav Shpilevoy Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Hi! Thanks for the review! On 28.05.2021 09:23, Cyrill Gorcunov via Tarantool-patches wrote: > On Thu, May 27, 2021 at 11:28:02PM +0200, Vladislav Shpilevoy wrote: >> diff --git a/src/box/txn.c b/src/box/txn.c >> index 1d42c9113..3d4d5c397 100644 >> --- a/src/box/txn.c >> +++ b/src/box/txn.c >> @@ -880,8 +880,14 @@ txn_commit(struct txn *txn) >> if (req == NULL) >> goto rollback; >> >> - bool is_sync = txn_has_flag(txn, TXN_WAIT_SYNC); >> - if (is_sync) { >> + /* >> + * Do not cash the flag value in a variable. The flag might be deleted > > I suspect you meant "cache"? Obviously flag won't be paying any money :-) > >> + * during WAL write. This can happen for async transactions created >> + * during CONFIRM write, whose all blocking sync transactions get >> + * confirmed. They they turn the async transaction into just a plain > > "Then they" I guess? No need for diff, just force push an update please. Yes, sorry, I was in a big hurry when sent this patch. Fixed on the branch.