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 278006EC40; Wed, 22 Sep 2021 16:07:50 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 278006EC40 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1632316070; bh=S1ekYuQOj7GefgGHyzFfuHOyKqFI9BdEXPmohz84RRM=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=DE1ZTUtWpG0DC7PaPBEk4djHDorGuemke3eXlCPxE/GMxhQgwtMgJnNlOJm9Jz1N9 C2sH862GSFYRShWXOIvHphMgT+83LGIabiLzVdgTKnWNflez4oCFmjk9yO6rp/DWhG a9Q8DN24mmjyCfzaBQb0TBzJAQkZi5aWDywIaqac= Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) (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 29B416EC40 for ; Wed, 22 Sep 2021 16:06:34 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 29B416EC40 Received: by mail-lf1-f41.google.com with SMTP id x27so11670793lfu.5 for ; Wed, 22 Sep 2021 06:06:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=A/TPogTR3kq0pWUibAXdfK6zNtyfIkOSsy6y8a9e0NA=; b=Ymig52Z1n0+OLYYjkvUjqs12QfXYRz+ESs84g51jaMMVnzTOPnMhpk+EHP1FEE5Pge kVSt8srqcf6dSdFiPITvHRuVa/jkgvkZmno9Bezp4PUW1Si3ArnRifYasd+DB9vLK9lL tfdbpU1u4yrINmbb1E3LEKS18Hh00QNuj/itjAmzf/g1bcOfrFRhFmHnGomsBvtEC/Bm iObzzUzNWwmIGHq5wXy8bIAMpFvYTUujuNNpgumDElPxh9BwGMml4pqPQZGwoSl9O0Cy 8uEP1wvSlMeOXA8XbvSzxb4TjWlz38NeHdEIz7TUpPAvJIvqhPMR7raFhIIbRtpaQ6Sr 8Rdw== X-Gm-Message-State: AOAM533FFipo2U7+U/4o0NEH/DxzYM10qiSBFGLWcJLMxjC6xy8jWA0P zxbLEGjmcTJJTXIrOYIXRiwaqK3kgZvCZg== X-Google-Smtp-Source: ABdhPJx3iM+c7AN7r+P6J4eWmg1eFkv8Ej0DKjDH9vOMilsADCYbRY4SX411GzOLaW7WB0T8ICry3g== X-Received: by 2002:a2e:984:: with SMTP id 126mr28465982ljj.169.1632315984774; Wed, 22 Sep 2021 06:06:24 -0700 (PDT) Received: from grain.localdomain ([5.18.253.97]) by smtp.gmail.com with ESMTPSA id x1sm250224ljh.113.2021.09.22.06.06.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Sep 2021 06:06:23 -0700 (PDT) Received: by grain.localdomain (Postfix, from userid 1000) id 5082D5A0022; Wed, 22 Sep 2021 16:05:36 +0300 (MSK) To: tml Date: Wed, 22 Sep 2021 16:05:34 +0300 Message-Id: <20210922130535.79479-5-gorcunov@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210922130535.79479-1-gorcunov@gmail.com> References: <20210922130535.79479-1-gorcunov@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH v17 4/5] qsync: export more details on promote tracking 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" The patch introduces `promote` leaf to `box.info.synchro` table. | tarantool> box.info.synchro | --- | - queue: | len: 0 | owner: 1 | quorum: 1 | promote: | term_max: 4 | term_map: {1: 4} | ... An idea is to be able to track changes of seen requests. Since it is internal implementation details I prefer to not document it. Actually better to mark is as non-API somehow. Part-of #6036 Signed-off-by: Cyrill Gorcunov --- src/box/lua/info.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/box/lua/info.c b/src/box/lua/info.c index 040af306a..144fba12d 100644 --- a/src/box/lua/info.c +++ b/src/box/lua/info.c @@ -607,7 +607,7 @@ lbox_info_election(struct lua_State *L) static int lbox_info_synchro(struct lua_State *L) { - lua_createtable(L, 0, 2); + lua_createtable(L, 0, 3); /* Quorum value may be evaluated via formula */ lua_pushinteger(L, replication_synchro_quorum); @@ -622,6 +622,15 @@ lbox_info_synchro(struct lua_State *L) lua_setfield(L, -2, "owner"); lua_setfield(L, -2, "queue"); + /* Promote related info. Suitable for debug. */ + lua_createtable(L, 0, 2); + lua_pushnumber(L, queue->promote_greatest_term); + lua_setfield(L, -2, "term_max"); + lua_pushstring(L, "term_map"); + lbox_pushvclock(L, &queue->promote_term_map); + lua_settable(L, -3); + lua_setfield(L, -2, "promote"); + return 1; } -- 2.31.1