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 94B3D6EC55; Fri, 7 May 2021 00:41:40 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 94B3D6EC55 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1620337300; bh=Ddk7gZ9X5Am1KyutOtWK2T1lCKFNL26TAIH3Ms37RMY=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=jEhBD0b9d+WAi/D7JrkorUObhBpx5nP6Ri1qkmqllmHaHByNWOvxtd/39FX6YzCgo VfmjOvnrcPGwzfttPE2ds9Q1jpOwgwk4vpcmxCc4duJwQYS2nJO2eqjPjvIPA4hbzI 3ZgW+CeECyd3ZDGO+hOzlPvUKoxkqPj6NNnNPqk0= Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com [209.85.208.178]) (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 9BED36EC55 for ; Fri, 7 May 2021 00:41:38 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 9BED36EC55 Received: by mail-lj1-f178.google.com with SMTP id a36so8943101ljq.8 for ; Thu, 06 May 2021 14:41:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=+bkJCzHCLEXoTvegSQmGWc4CLrRXs5uj6VIdjrrf2qE=; b=cjS60MLviNDRpYsbywIJ1rU2c0uNlaCqn95wJOvhFvYSd13KGnfFbjkVfxn6JNiduc X8/ZFmWrHOlIf7Zbgq7wcRb/pAWayTdWbsbypgONG0HuX01FkyNfsdGuvoZ5o+8Ey7nM 31I6NXoCsE7PXEJskhdsjAm0Ps8ai/tCjakvaSFtWUqmcLQbC11t2kFADiyGf2pxHJVe 7eFDk8z8cZ8kQOngCK1FgjXQ+Zka6GC0F0KTPwDEer14NrXz+tZxEwu6OnsuQYBOnH1G gc0RGwfN5og1NVgkbDTWqwmADKB22GDuVkIqaPfLnIF/fx1vd03mn9LsLRu81qsZmIen aEMQ== X-Gm-Message-State: AOAM530ss30W0+hCuE24GoApx+w81Jx+OWMF4QKCk8iroH6OcCP7dAzH xDdwgHnuEMiaYPbcXYWqAk9SERRyIyE= X-Google-Smtp-Source: ABdhPJwL3S/yrcTmeoflC20IDyBtYxqsz+5PEi7SaasAKXnpuEgJshCBJTKiXNUdu48uRhQqh9443g== X-Received: by 2002:a2e:bc22:: with SMTP id b34mr5057229ljf.392.1620337297531; Thu, 06 May 2021 14:41:37 -0700 (PDT) Received: from grain.localdomain ([5.18.171.94]) by smtp.gmail.com with ESMTPSA id w21sm954131lfl.230.2021.05.06.14.41.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 May 2021 14:41:34 -0700 (PDT) Received: by grain.localdomain (Postfix, from userid 1000) id E6C4856017B; Fri, 7 May 2021 00:41:33 +0300 (MSK) To: tml Date: Fri, 7 May 2021 00:41:30 +0300 Message-Id: <20210506214132.533913-1-gorcunov@gmail.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH v4 0/2] relay: provide downstream lag information 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 Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Guys, take a look once time permit. Previous version is here https://lists.tarantool.org/tarantool-patches/20210430153940.121271-1-gorcunov@gmail.com/ v4 (by Vlad): - add a test case - add docbot request - dropped off xrow_encode_vclock_timed, we use opencoded assignment for tm value when send ack - struct awstat renamed to applier_wal_stat. Vlad I think this is better name than "applier_lag" because this is statistics on WAL, we simply track remote WAL propagation here, so more general name is better for grep sake and for future extensions - instead of passing applier structure we pass replica_id - the real keeper of this statistics comes into "replica" structure thus unbound of applier itself - for synchro entries we pass a pointer to the applier_wal_stat instead of using replica_id = 0 as a sign that we don't need to update statistics for initial and final join cases - to write and read statistics we provide wal_stat_update and wal_stat_ack helpers to cover the case where single ACK spans several transactions branch: gorcunov/gh-5447-relay-lag-4 issue: https://github.com/tarantool/tarantool/issues/5447 Cyrill Gorcunov (2): applier: send transaction's first row WAL time in the applier_writer_f relay: provide information about downstream lag .../unreleased/gh-5447-downstream-lag.md | 6 ++ src/box/applier.cc | 92 +++++++++++++++--- src/box/applier.h | 14 +++ src/box/lua/info.c | 3 + src/box/relay.cc | 18 ++++ src/box/relay.h | 6 ++ src/box/replication.cc | 3 + src/box/replication.h | 4 + .../replication/gh-5447-downstream-lag.result | 93 +++++++++++++++++++ .../gh-5447-downstream-lag.test.lua | 41 ++++++++ 10 files changed, 267 insertions(+), 13 deletions(-) create mode 100644 changelogs/unreleased/gh-5447-downstream-lag.md create mode 100644 test/replication/gh-5447-downstream-lag.result create mode 100644 test/replication/gh-5447-downstream-lag.test.lua base-commit: 4500547d7a177c0b49bff35c922286b4f21c8719 -- 2.30.2