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 CCD2D6EC55; Thu, 17 Jun 2021 12:01:36 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org CCD2D6EC55 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1623920496; bh=hRtXLPR3xBXJgn2VsdZOEbpSOPjhj9vetG8AZDAsJEI=; 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=AAVNhSdvwVZOEuwAJChaggm9XYBVUKi+pW2sq+OZZhcOpQEBB3rc7U14oON5ojfdW YVq2itC9pjjTGA+x2YsssKAvD1Sd+/uwpXVxXgMrV+vBOswhSLv8PCuKR5H54mEpzR 7VfjdDVbbd+dgBCour6EAjHUdRJ6Lc2aDwARmlCY= Received: from smtp44.i.mail.ru (smtp44.i.mail.ru [94.100.177.104]) (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 C57A46EC55 for ; Thu, 17 Jun 2021 12:01:34 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org C57A46EC55 Received: by smtp44.i.mail.ru with esmtpa (envelope-from ) id 1ltnu1-0002kT-FW; Thu, 17 Jun 2021 12:01:33 +0300 To: Cyrill Gorcunov References: <20210607155519.109626-1-gorcunov@gmail.com> <20210607155519.109626-3-gorcunov@gmail.com> <73be2a27-dacf-c750-7bb6-da777b9c2f5a@tarantool.org> Message-ID: Date: Thu, 17 Jun 2021 12:01:32 +0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 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-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9C7814344C8C501C80B285FF4C2BA13B04FDAAAED271C49ED182A05F5380850404703502686D22131907093A3F3F047E691516A26E98014E04C8FDCE0BE3C746E X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE745C0EDBD94D46193EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006371A00CE7BDCE207EB8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D851F9AE1AF9DD548AE795177D3E466B82117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC5FC25ED3FCEC3375A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F4460429728776938767073520B1593CA6EC85F86DF6B57BC7E6449061A352F6E88A58FB86F5D81C698A659EA7E827F84554CEF5019E625A9149C048EE9ECD01F8117BC8BEE2021AF6380DFAD18AA50765F790063735872C767BF85DA227C277FBC8AE2E8BAEB924C2B054B06E75ECD9A6C639B01B4E70A05D1297E1BBCB5012B2E24CD356 X-C1DE0DAB: 0D63561A33F958A5B23D7F4B705F3659FB67DB843879C038DCAE4A36EE628E39D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75FBC5FED0552DA851410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34D1AE09A115117C960F48B4AE156F569CDAC853CD304EC1B32D875C5866A795345E1C55D9521D19E91D7E09C32AA3244C6B776EB0CA0D286C05980CFF5E39BACCE646F07CC2D4F3D8927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojo2TEchKDd+cY36TouL7N2Q== X-Mailru-Sender: 3B9A0136629DC9125D61937A2360A446651A136644E9F527B8D6D2A0DF207132FAE213C065C65B62424AE0EB1F3D1D21E2978F233C3FAE6EE63DB1732555E4A8EE80603BA4A5B0BC112434F685709FCF0DA7A0AF5A3A8387 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v8 2/2] relay: provide information about downstream lag 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: Vladislav Shpilevoy , tml Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" 17.06.2021 09:55, Cyrill Gorcunov пишет: > On Tue, Jun 15, 2021 at 01:03:59PM +0300, Serge Petrenko wrote: >>> In other words this is a lag in seconds between the main node writes >>> data to own WAL and the replica `n` get this data replicated to own >>> WAL journal. >> This is not true. You describe `upstream.lag` in this paragraph. >> Downstream lag is the time difference between the WAL write on master >> side and the receipt of an ack (confirmation of a WAL write on replica) >> for this transaction. Also on master side. > No. The upstream.lag is calulated as > > applier_read_tx_row > ... > applier->lag = ev_now(loop()) - row->tm; Ok, I meant your description looks similar to upstream.lag. > > IOW it is a time between data is written to txn initiator to WAL and > the packet _received_ by replica, and there is no guarantee that the > packet will be *replicated* at all. In turn for downstream we compute > time delta when data is already writtent to a replica's WAL. > > Cyrill > I think I understand what you mean now. But still, this description is confusing. When you're saying it's "time delta when data is already written to a replica's WAL" it sounds like the delta is taken on replica, not on master. And that's not true. It's also unclear from this description that packet travel time (ack from replica to master) is included into downstream.lag So I would reformulate the description to something like "Downstream.lag is the lag between the main node writes a certain transaction to it's own WAL and the moment it receives an ack for this transaction from a replica". -- Serge Petrenko