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 BD813CC307; Thu, 21 Jan 2021 20:18:35 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org BD813CC307 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1611249515; bh=OG8EBkNydV7/nopB5R6p/5xRplKVHuQHzLp4Cf/n9JY=; 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=Gu0wU4JvjZjRYdeUsrD7RptOTEPTKec9w2TqrSE/iXa3sRPSDjD6fjNygOSGGyjTE 80PUaJx8ItnaDJKi1IHuNOX0EmuU4AO82jqj+lwTtIsE4k4thBYA0kMOwVMgNXLrQf dz8XgdbWkyi9Iu5pYrht9/QWa2ocKtwZY8yaLMFA= Received: from mail-lj1-f179.google.com (mail-lj1-f179.google.com [209.85.208.179]) (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 7D74A6465D for ; Thu, 21 Jan 2021 20:18:15 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 7D74A6465D Received: by mail-lj1-f179.google.com with SMTP id 3so3387052ljc.4 for ; Thu, 21 Jan 2021 09:18:15 -0800 (PST) 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=z8GnK8kJxuaYXGa3Ei17Flx4IWkSfVaD9NzDipI5QFI=; b=sTM5ifYQEy+1HsQs9nREdR+vVJZx3C29MKzk3UotqqApr7EyqZXozXwbO8ax/xLsby pxYsKWr8XSB/ltf74u/T3M/AKucqN5PMzbTDwRBJJLMrpwhAY75lSxBxZuXDOyVFrGKq F54n2ifb8o7whvWUr/IUQyPoUxQ+CQORuTymsI/iy2WwF9qEXgu1AGta6uxTUKqkENcM X39W2DdYcx1NPuP+dDTb85ydeDUdxDRyB4dI+4mptx19OBCoUu7DLEU26Lh/Hkr7rWjg qGG7Z3AXqaWPAsQmsbW+LPjBOokTq2OM7OWMkJIO5lY1qoGJjix2voorTbc6YYK5UT7L Ybww== X-Gm-Message-State: AOAM530QF5HAbfKRK83BhXHjBSY2/VhDf/DDf6GVeGFoU6UAYiNE0h5V Rt1net1yzZRla3W8D9+Is/Z81UPNv6E= X-Google-Smtp-Source: ABdhPJyDBEBWBkR9B9zCt9AQROVq6x2O56S3Sv51sBpBM4V7h7wFgfIwe4u2hn+uarZhXLYnKerLmw== X-Received: by 2002:a05:651c:1192:: with SMTP id w18mr186098ljo.40.1611249494304; Thu, 21 Jan 2021 09:18:14 -0800 (PST) Received: from grain.localdomain ([5.18.91.94]) by smtp.gmail.com with ESMTPSA id n10sm649958lji.99.2021.01.21.09.18.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Jan 2021 09:18:12 -0800 (PST) Received: by grain.localdomain (Postfix, from userid 1000) id F1BB056007F; Thu, 21 Jan 2021 20:17:58 +0300 (MSK) To: tml Date: Thu, 21 Jan 2021 20:17:50 +0300 Message-Id: <20210121171753.186891-2-gorcunov@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210121171753.186891-1-gorcunov@gmail.com> References: <20210121171753.186891-1-gorcunov@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH 1/3] xrow: encode timestamp into vclock message 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 vclock message sent by "applierw" fiber to the replication master node operates not only for tracking status of applied data but also as a heartbeat packets (after 1.7.7). The timestamp field of the xrow_header left zero here we can reuse it to track downstream node state by putting realtime value here. This won't break any existing instances without the patch because the field is unused anywhere yet. Need to mention that xrow_encode_vclock used for other stages such as joining and encoding realtime value here won't hurt as well. Part-of #5447 Signed-off-by: Cyrill Gorcunov --- src/box/xrow.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/box/xrow.c b/src/box/xrow.c index bc06738ad..1a077fafd 100644 --- a/src/box/xrow.c +++ b/src/box/xrow.c @@ -1648,6 +1648,7 @@ xrow_encode_vclock(struct xrow_header *row, const struct vclock *vclock) row->body[0].iov_base = buf; row->body[0].iov_len = (data - buf); row->bodycnt = 1; + row->tm = ev_now(loop()); row->type = IPROTO_OK; return 0; } -- 2.29.2