[Tarantool-patches] [PATCH v8 2/2] Vlad: applier filtration

Cyrill Gorcunov gorcunov at gmail.com
Fri Jun 11 18:22:59 MSK 2021


Signed-off-by: Cyrill Gorcunov <gorcunov at 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



More information about the Tarantool-patches mailing list