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 A5E7E6EC5B; Wed, 12 May 2021 14:30:20 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org A5E7E6EC5B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1620819020; bh=f/Tizzu9aDdYR4/NW6CftIWHw0O6lJXvN42BC5mYbFI=; 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=Xx4hL7UGZ8RUrnrogSDCtJULPBcWRey3nJAitveugw+sl1uGV4kzQrCZATeWXoWRC Qj0bfclkprB6F9iKmyFNZspy4shM5et11y01XjxmjOjNOmIvrTomopwSUx87KlJELe u7b78qi6ysyCczHBP4Y31MKPLrWPRvVOKwJNE/kc= Received: from smtp33.i.mail.ru (smtp33.i.mail.ru [94.100.177.93]) (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 246BA6EC5B for ; Wed, 12 May 2021 14:30:19 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 246BA6EC5B Received: by smtp33.i.mail.ru with esmtpa (envelope-from ) id 1lgn4E-00062X-H3; Wed, 12 May 2021 14:30:18 +0300 To: Vladislav Shpilevoy , gorcunov@gmail.com Cc: tarantool-patches@dev.tarantool.org References: <20210426165954.46474-1-sergepetrenko@tarantool.org> <738d3030-80cf-8079-1b03-55a7d665dbbf@tarantool.org> <3d0997f3-066f-5b2c-3ae3-22b90583e9bf@tarantool.org> <70224f08-737b-db3c-b809-1472ed603568@tarantool.org> Message-ID: <7efe2a01-2a79-7605-15c4-d238959118b7@tarantool.org> Date: Wed, 12 May 2021 14:30:17 +0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <70224f08-737b-db3c-b809-1472ed603568@tarantool.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD95978C26455E69BE0B2C7F7C3B0039F139F0EF8E3717E163C182A05F538085040832CEE75BAFF298BC27283E8E010715705FE4F1B1145A9FA4DF6C67D1B5669F5 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7850A3F981F25E362EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637DEEC83A7CF8598608638F802B75D45FF914D58D5BE9E6BC1A93B80C6DEB9DEE97C6FB206A91F05B2A3BCEE361C41229FD207C60558FD5ED52CC0D3CB04F14752D2E47CDBA5A96583C09775C1D3CA48CF329DC2EF12373DEA117882F4460429724CE54428C33FAD30A8DF7F3B2552694AC26CFBAC0749D213D2E47CDBA5A9658378DA827A17800CE754B4581DB7A805049FA2833FD35BB23DF004C906525384302BEBFE083D3B9BA71A620F70A64A45A98AA50765F79006372E808ACE2090B5E1725E5C173C3A84C3C5EA940A35A165FF2DBA43225CD8A89FB26E97DCB74E6252A91E23F1B6B78B78B5C8C57E37DE458BEDA766A37F9254B7 X-C1DE0DAB: 0D63561A33F958A507A80D1F16A4E20CBC1BDD2CD4B8FEA00BCA3C7632EDDFECD59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7502E6951B79FF9A3F410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D346B71C4B0698719D71BCB5558BA65B24CF7489566910C75BE313B1A5BFB3195D560C6BA9FB29DDA6D1D7E09C32AA3244C881D4D40CB15BAD9481B750194BEE2CE6C24832127668422FACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojo6y/qPNd2uwTv3gjsnZf/w== X-Mailru-Sender: 3B9A0136629DC9125D61937A2360A446762EB84BBA2E46C33137DB4D0AF2043099D256EB3BFD87EF424AE0EB1F3D1D21E2978F233C3FAE6EE63DB1732555E4A8EE80603BA4A5B0BC112434F685709FCF0DA7A0AF5A3A8387 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH] recovery: make it yield when positioning in a WAL 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" 29.04.2021 23:03, Vladislav Shpilevoy пишет: > Hi! Thanks for the patch! > > Technically looks good now, can be pushed. > > But in case you would find it interesting: now relay->row_count looks odd. > Because its comment is not very correct, most of that is moved to the > recovery layer. And because it is used only by initial join. And because we > still have a single place where we use xstream/recovery, but the yields > are not managed by them. > > Did you think about moving your code to xstream instead of recovery? Then > it would be truly not related to recovery. It would have 2 methods: > > - write(struct xstream *, struct xrow_header *) > - skip(struct xstream *, struct xrow_header *) > > Recovery calls skip() while establishes a position, for each skipped row. > Relaying from memory never calls skip, but calls only write() like now. > > In order to yield you inherit xtream, add a member row_count, and both in > skip() and write() increment it like you do. And then yield periodically. > > It would work for the initial join too. > > Or add row_count right to the xtream struct, and replace skip() with your > function schedule_yield(). This way row_count would be visible to recovery > and available for reporting in the logs like '... rows recovered'. And we > wouldn't all too many virtual functions for the skipped rows. > > All that up to you. Thanks for your input! I took the approach with moving schedule_yield to struct xstream. Please, check it out in v2. -- Serge Petrenko