From: Cyrill Gorcunov via Tarantool-patches <tarantool-patches@dev.tarantool.org> To: tml <tarantool-patches@dev.tarantool.org> Cc: Vladislav Shpilevoy <v.shpilevoy@tarantool.org> Subject: [Tarantool-patches] [PATCH v8 2/2] Vlad: applier filtration Date: Fri, 11 Jun 2021 18:22:59 +0300 [thread overview] Message-ID: <20210611152259.205627-3-gorcunov@gmail.com> (raw) In-Reply-To: <20210611152259.205627-1-gorcunov@gmail.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> --- 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
prev parent reply other threads:[~2021-06-11 15:24 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-06-11 15:22 [Tarantool-patches] [PATCH v8 0/2] filter incoming packets Cyrill Gorcunov via Tarantool-patches 2021-06-11 15:22 ` [Tarantool-patches] [PATCH v8 1/2] applier: filter incoming synchro packets via transaction initiator Cyrill Gorcunov via Tarantool-patches 2021-06-15 10:36 ` Serge Petrenko via Tarantool-patches 2021-06-15 11:35 ` Serge Petrenko via Tarantool-patches 2021-06-15 11:55 ` Serge Petrenko via Tarantool-patches 2021-06-11 15:22 ` Cyrill Gorcunov via Tarantool-patches [this message]
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210611152259.205627-3-gorcunov@gmail.com \ --to=tarantool-patches@dev.tarantool.org \ --cc=gorcunov@gmail.com \ --cc=v.shpilevoy@tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH v8 2/2] Vlad: applier filtration' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox