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 E77E06C7D3; Fri, 5 Feb 2021 10:53:38 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org E77E06C7D3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1612511619; bh=0HpqUYIBxlTMppgDrdEke9spOU6NeMkv2CU9sHGSWAk=; h=To:References:Date:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=iRD9Pk5i4/M8qt79vvpt2Hd2B7Kv1b3V8VQT45u17onkDhZKOyxxv4igVZLFSeux2 IwdGrURF5Pdl4prCZLyWIoe1E/ENeVemcL2X79n3FTyoim7QX+Q0q3zqx+wf3THTGa 0UWIFRrZO2C9CpB/hpMPx9tQZOjViG6RG29rSrRA= Received: from smtp36.i.mail.ru (smtp36.i.mail.ru [94.100.177.96]) (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 6C2AE6C7D3 for ; Fri, 5 Feb 2021 10:53:38 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 6C2AE6C7D3 Received: by smtp36.i.mail.ru with esmtpa (envelope-from ) id 1l7vvp-0004Gy-HS; Fri, 05 Feb 2021 10:53:33 +0300 To: Cyrill Gorcunov References: <20210204111912.496547-1-gorcunov@gmail.com> <20210204143157.GG2172@grain> Message-ID: <358c2eb8-0866-95f5-93a8-316eed6c1146@tarantool.org> Date: Fri, 5 Feb 2021 10:53:32 +0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: <20210204143157.GG2172@grain> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD953AC099BC0052A9C67057FEA5FC82C6F3EDA0BC0B7FA0DC2182A05F538085040D6AB1CDD8EB21B2807F82E065FD57F2E9A13E981EDB43DDAD547FCE2EFFB92E8 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7FFA2A8BF6367A61CEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637205505A8D8EF484BEA1F7E6F0F101C674E70A05D1297E1BBC6CDE5D1141D2B1C1F235510816A8C6BF055329E46C203C21D550D94A0A376009FA2833FD35BB23D9E625A9149C048EE33AC447995A7AD18E5D25F19253116ADD2E47CDBA5A96583BD4B6F7A4D31EC0BC014FD901B82EE079FA2833FD35BB23D27C277FBC8AE2E8B3733B5EC72352B9FA471835C12D1D977C4224003CC836476EC64975D915A344093EC92FD9297F6718AA50765F7900637964450D2F8F18CFDA7F4EDE966BC389F395957E7521B51C24C7702A67D5C33162DBA43225CD8A89FD2A95C73FD1EFF4557739F23D657EF2BB5C8C57E37DE458B4C7702A67D5C3316FA3894348FB808DB48C21F01D89DB561574AF45C6390F7469DAA53EE0834AAEE X-C1DE0DAB: 0D63561A33F958A5AD7A741EF4CCA7F42096633BA717131BB39A3568B89E07CED59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75448CF9D3A7B2C848410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34D6AC337C1E637B8A78C68D5C7DE3514809671D76349EB43B05C44DB02D1E339DCF2B4E8658424FAC1D7E09C32AA3244C67985BACFDCEFF52B0E20A87F23D2F77FE8DA44ABE2443F7927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojQDytKvZo6VsXVMZrxI1m6w== X-Mailru-Sender: 3B9A0136629DC9125D61937A2360A446CFF6C30C4FA38311AC6D7B1549C690E93120E6DF4C9998C9424AE0EB1F3D1D21E2978F233C3FAE6EE63DB1732555E4A8EE80603BA4A5B0BC112434F685709FCF0DA7A0AF5A3A8387 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v3] txn: convert flags to explicit bitfield 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 Cc: tml , Vladislav Shpilevoy Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" 04.02.2021 17:31, Cyrill Gorcunov пишет: > On Thu, Feb 04, 2021 at 05:01:07PM +0300, Serge Petrenko wrote: > ... >>> /** >>> * Synchronous transaction touched sync spaces, or an >>> * asynchronous transaction blocked by a sync one until it >>> * is confirmed. >>> */ >>> - TXN_WAIT_SYNC, >>> + TXN_WAIT_SYNC = 0x10, >>> /** >>> * Synchronous transaction 'waiting for ACKs' state before >>> * commit. In this state it waits until it is replicated >>> @@ -82,14 +82,14 @@ enum txn_flag { >>> * commit and returns success to a user. >>> * TXN_WAIT_SYNC is always set, if TXN_WAIT_ACK is set. >>> */ >>> - TXN_WAIT_ACK, >>> + TXN_WAIT_ACK = 0x20, >> Since setting `TXN_WAIT_ACK` always implies setting `TXN_WAIT_SYNC`, and >> when TXN_WAIT_ACK is cleared, TXN_WAIT_SYNC is also cleared, you may >> define TXN_WAIT_ACK = 0x30 for simplicity. >> Then setting TXN_WAIT_ACK will set TXN_WAIT_SYNC implicitly. And same for >> clearing TXN_WAIT_ACK. > Yes, but this won't get exact match for txn_has_flag, which tests > for a single bit now. Surely I can setup Ok, I see. Why not make txn_has_flag check for entire flag then? > > TXN_WAIT_ACK = 0x20 | TXN_WAIT_SYNC > > if you and Vlad agrees. Let's wait for what Vlad has to say -- Serge Petrenko