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 86A6F6EC58; Fri, 28 May 2021 22:13:23 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 86A6F6EC58 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1622229203; bh=KJKqE9JpvLHrYzftW0i/wTjRhqcOVYvINnzqhTof+DQ=; 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=brXYGUGuZFBp4Ql7559oUY5fzszSYQPl5YUP/ueWGYMgUlYN6O5pz/e6VeEsO67ip I2TX2j1YBbZTee0hq/FB9DJVwBDJ0kNCf7YUw7e2sJ+vLP/+U/Zy+VpfEuvHIGYFgJ itRnaHred6YDf7QoYHjqhkGwgpVjU9vY3x5FA4I8= 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 02E586EC58 for ; Fri, 28 May 2021 22:13:20 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 02E586EC58 Received: by smtp48.i.mail.ru with esmtpa (envelope-from ) id 1lmhv5-0001LQ-Ql; Fri, 28 May 2021 22:13:20 +0300 To: Serge Petrenko , tarantool-patches@dev.tarantool.org, gorcunov@gmail.com References: <3dc7734c-a572-7f69-a6b8-ad5aa7536873@tarantool.org> Message-ID: Date: Fri, 28 May 2021 21:13:18 +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: <3dc7734c-a572-7f69-a6b8-ad5aa7536873@tarantool.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9157EECD0FDB90B9A7712F917240E18A5E40D698B3575A0AC00894C459B0CD1B936CBDDE2EF768FFFE6B68BAEFAA2C04F14D1348FF9502AB9FD50102C7C5B78F1 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE74E2C4641A2CB07F2EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637578F58D66D7052C48638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8E732EA10D8088ADA187EBE298927E4B0117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC2F22DFD7D6B35478A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F44604297287769387670735204B6963042765DA4BF6B57BC7E6449061A352F6E88A58FB86F5D81C698A659EA73AA81AA40904B5D9A18204E546F3947CD56D36E97F3F038CAD7EC71F1DB884274AD6D5ED66289B52698AB9A7B718F8C46E0066C2D8992A16725E5C173C3A84C318264FC03A346C19BA3038C0950A5D36B5C8C57E37DE458B0BC6067A898B09E46D1867E19FE14079C09775C1D3CA48CF3D321E7403792E342EB15956EA79C166A417C69337E82CC275ECD9A6C639B01B78DA827A17800CE7E1BCFB2C0BE3F189731C566533BA786AA5CC5B56E945C8DA X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A24209795067102C07E8F7B195E1C97831AB51EE6CC9B131F8285D1CF7EB47FA2E X-C1DE0DAB: 0D63561A33F958A5729D89C3C05306A08AF808159AE17EA45240D12E298110FCD59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA752FA4FC647EE431D9410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D346C409ABC5F9C579B1A5EECC6DDD3544BFCE788E52BF8EA34552B1820DAB40CB6ADD26BB8BAF280A71D7E09C32AA3244C9063BA069C3E7666C5107B19F1126521250262A5EE9971B0FACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojrzEAfVgW/77yjQdDgyzo6A== X-Mailru-Sender: 504CC1E875BF3E7D9BC0E5172ADA311021F6370E1F32FF700A5B492F8069386C8C7764B41FF7EAAB07784C02288277CA03E0582D3806FB6A5317862B1921BA260ED6CFD6382C13A6112434F685709FCF0DA7A0AF5A3A8387 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! >> 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);