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 CFBBB6EC40; Wed, 2 Jun 2021 11:41:15 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org CFBBB6EC40 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1622623275; bh=N3kWl8P23xLXDx9QVRzHaZwvzvyayDMLRuo3ClAD1as=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=VW5AnxLmzzet1rY3MWfnr1x5klYoy0KhtTIVfSyQipxKmOdgqD+3t/oVP9nt9b5PO w40KBtZdX8e3eIxLBTtfvjkPuE/BNk+h85mZY+Pef16ehVDki0NQkRwmGzHT+jyP9X vS9EIsh5vtkWmIFsC92xZuKKXJznRSozATnDfsNo= Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 8F26F6EC40 for ; Wed, 2 Jun 2021 11:41:14 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 8F26F6EC40 Received: by mail-lf1-f47.google.com with SMTP id f30so2174290lfj.1 for ; Wed, 02 Jun 2021 01:41:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=GB2+31LY6ey0k//kkMeRgJ48+6SfZpGY5UBfYSSSYZM=; b=mt3V0MA5+YbnJk7GOOVyxcC3srWW/vCzh5ph1k0fA/aXwtjhakfwWyqKsI1Ptup/tk sIV9FrZMPY+VkXYBDHDorSYNb/PNXpgWbHvS35y1J3RZ6aVuKDYxmyvqMp1VS50CDH/t HV07ZcgQ3ogzKi6fkxYgWMwqAZfXmPLmMXE2ayX5dP2cv4wboDDkR4yMux3zXcdZGJTd N0jZ8pXTIm1Wj4nYn48fKfpNGohCsIrxNvlMJxoN0q+BZDbskE1YzSUN9qaZDnsv6t6W g6025A9dXAJfESvSNGXaZCnG+BC9bPzwCdTiNETfhUiJcoqaajv9ATu4Es/74Dcp9cXX SWwA== X-Gm-Message-State: AOAM530GjKVJgCuYSzs3A8Ob7fVgRJeXNnkwaNKsL7fWuWAfbTgHez9s s2Z1/JPIkno0aRVWNPsNcHJJPOXK/KQ= X-Google-Smtp-Source: ABdhPJxkgbPlJBkVBzoXWF61J/8T/z1tUSwbiyWYbQOgjJ2OOSNJbArgDcFKlq4jW/fESmv9nEhRbA== X-Received: by 2002:a05:6512:3302:: with SMTP id k2mr7159690lfe.378.1622623273594; Wed, 02 Jun 2021 01:41:13 -0700 (PDT) Received: from grain.localdomain ([5.18.171.94]) by smtp.gmail.com with ESMTPSA id r15sm1928443lfr.245.2021.06.02.01.41.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Jun 2021 01:41:12 -0700 (PDT) Received: by grain.localdomain (Postfix, from userid 1000) id 90D495A0042; Wed, 2 Jun 2021 11:41:11 +0300 (MSK) Date: Wed, 2 Jun 2021 11:41:11 +0300 To: Serge Petrenko Message-ID: References: <43b6b0d8-b5e9-e8e5-1b6d-ed550c674c11@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <43b6b0d8-b5e9-e8e5-1b6d-ed550c674c11@tarantool.org> User-Agent: Mutt/2.0.7 (2021-05-04) Subject: Re: [Tarantool-patches] [RFC] on downstream.lag design 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: Cyrill Gorcunov via Tarantool-patches Reply-To: Cyrill Gorcunov Cc: Vladislav Shpilevoy , TML Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" On Wed, Jun 02, 2021 at 09:55:38AM +0300, Serge Petrenko wrote: > > What's wal_st? Is it a list of all sent out xrow.tms? It is a new structure, where I will remember the last xrow.tms. In previous version I kept there first synchro row timestamp. ... > > > > Once ACK is obtained the lag set to some positive value [ev_now - xrow.tm]. > > This value remains immutable until new sync transaction is sent. On new > > sync transaction we do the same -- asign value from row.tm and count > > time until ACK is received. > > I'm not sure I understood it all correstly. Correct me if I'm wrong, > here's how I unerstand it: > > You save xrow.tm in a list or something in relay, once sending the > corresponding row out. > > When applier sends out an acks for the row, the ack contains the same > xrow.tm received earlier. > > Relay, upon receiving an ack, finds the corresponding xrow.tm in list and > removes it. > > Every time downstream.lag is read it is equal ev_now() - oldest xrow.tm in > list. > > Is this right? Kind of. I hasn't considered a list here but rather a single timestamp value per relay. As we've discussed verbally instead I should think over moving this tracking into txn_limbo instead. Gimme some time to propose a new design, I'll post it here.