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 BE22B6EC55; Fri, 11 Jun 2021 18:24:08 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org BE22B6EC55 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1623425048; bh=liQHvhNWSyQYjfo0pfDwf/ZdtvzHLu0YX0wzBAyELaY=; 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=C8hDGToOQn+GHm+fsMjxhPv1qdJmHohiLA9MnirmdQ0SRWrdUDqwUHnEs2sHYPZyf V4hoRPS1APMeUJGxLg9+hbwxDC29zrUJ9MISdZAomFZerotmCQS5V2PCoSv/Zmd3cB ZsatsVAIm99LlsIU4PqR9ndqAikYIYmhApCjJCgo= Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) (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 E0F566EC57 for ; Fri, 11 Jun 2021 18:23:27 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org E0F566EC57 Received: by mail-lf1-f53.google.com with SMTP id v22so9132402lfa.3 for ; Fri, 11 Jun 2021 08:23:27 -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:in-reply-to :references:mime-version:content-transfer-encoding; bh=/zda3f/ov4qKTuzNlHfCcT1v7HP2kREnDromxCHstwo=; b=fAfJ9VIDjupHTWB6XEC68PX+GrA6/1bjBLj2cy8k0NOrVoQyTAjn6hnL2056Tj2QUs v/Q1f8RjcXBpQgKLZwnRUUAORtC3A96ii53Y3fav1jO6s3vn4Z6enzo5JfT4Lg/AwlQU JBHgHVM8Rr8l0llF4/3iLhdbh6vv5wsMtYqC5Huw+7tWg+is+uz/9aE6m+QZWY7FrhAz ltklDeUDtuUULSIh0dML7IfYsysuOCpSQOF7Ft/jVSN5RCqPC7jrjY3wtOViPJZWI7CF sHONklfW7oGLV/D5agtalS/E5OPUI90Q6wvVvjzru+JswCxtKatSyYeRAdaNmwl1Mo4r 1vNg== X-Gm-Message-State: AOAM531H2Yl1cQPlAWQLzri7ApO4J7wmmj+Vcy+LgyWODoT1X+GZpznT kT1Ipsb+5Sn4MgDQKrw4n5bo+hS8/VQ= X-Google-Smtp-Source: ABdhPJwU4voPO1873WbRP4+mAqlyYoC2E6P+jOKH8C99ewQUxp6Ny1WVlvkCwGJTWvM5so8JD9HT0A== X-Received: by 2002:a05:6512:11e2:: with SMTP id p2mr3037009lfs.312.1623425006913; Fri, 11 Jun 2021 08:23:26 -0700 (PDT) Received: from grain.localdomain ([5.18.171.94]) by smtp.gmail.com with ESMTPSA id m19sm619891lfl.75.2021.06.11.08.23.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Jun 2021 08:23:25 -0700 (PDT) Received: by grain.localdomain (Postfix, from userid 1000) id 46AF25A0043; Fri, 11 Jun 2021 18:23:00 +0300 (MSK) To: tml Date: Fri, 11 Jun 2021 18:22:59 +0300 Message-Id: <20210611152259.205627-3-gorcunov@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210611152259.205627-1-gorcunov@gmail.com> References: <20210611152259.205627-1-gorcunov@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH v8 2/2] Vlad: applier filtration 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" Signed-off-by: Cyrill Gorcunov --- src/box/applier.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/box/applier.cc b/src/box/applier.cc index d3430f582..1d92a989d 100644 --- a/src/box/applier.cc +++ b/src/box/applier.cc @@ -973,7 +973,7 @@ apply_final_join_tx(struct stailq *rows) * The rows are replaced with NOPs to preserve the vclock consistency. */ static void -applier_synchro_filter_tx(struct stailq *rows) +applier_synchro_filter_tx(uint32_t replica_id, struct stailq *rows) { /* * XXX: in case raft is disabled, synchronous replication still works @@ -989,7 +989,7 @@ applier_synchro_filter_tx(struct stailq *rows) * node, so cannot check for applier->instance_id here. */ row = &stailq_first_entry(rows, struct applier_tx_row, next)->row; - if (!txn_limbo_is_replica_outdated(&txn_limbo, row->replica_id)) + if (!txn_limbo_is_replica_outdated(&txn_limbo, replica_id)) return; if (stailq_last_entry(rows, struct applier_tx_row, next)->row.wait_sync) @@ -1027,7 +1027,7 @@ nopify:; * Return 0 for success or -1 in case of an error. */ static int -applier_apply_tx(struct stailq *rows) +applier_apply_tx(struct applier *applier, struct stailq *rows) { /* * Initially we've been filtering out data if it came from @@ -1083,7 +1083,7 @@ applier_apply_tx(struct stailq *rows) } } } - applier_synchro_filter_tx(rows); + applier_synchro_filter_tx(applier->instance_id, rows); if (unlikely(iproto_type_is_synchro_request(first_row->type))) { /* * Synchro messages are not transactions, in terms @@ -1315,7 +1315,7 @@ applier_subscribe(struct applier *applier) diag_raise(); } applier_signal_ack(applier); - } else if (applier_apply_tx(&rows) != 0) { + } else if (applier_apply_tx(applier, &rows) != 0) { diag_raise(); } -- 2.31.1