From 096e453e61a623618c8dc7c82f221b8395be7e88 Mon Sep 17 00:00:00 2001 From: Georgiy Lebedev <g.lebedev@tarantool.org> Date: Thu, 6 Jun 2024 15:03:03 +0300 Subject: [PATCH] box: refactor synchro quorum update on deletion from `_cluster` space For symmetry with the update of the synchronous replication quorum on insertion into the `_cluster` space, let's reuse the `on_replace_cluster_update_quorum` on_commit trigger. Follows-up #10087 NO_CHANGELOG=<refactoring> NO_DOC=<refactoring> NO_TEST=<refactoring> (cherry picked from commit 9b63ced353eaf6c1224358c7d3655ca52f7d21fb) --- src/box/alter.cc | 5 +++++ src/box/replication.cc | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/box/alter.cc b/src/box/alter.cc index 36f97e7202..a054f512b5 100644 --- a/src/box/alter.cc +++ b/src/box/alter.cc @@ -4281,6 +4281,11 @@ on_replace_dd_cluster(struct trigger *trigger, void *event) if (on_commit == NULL) return -1; txn_stmt_on_commit(stmt, on_commit); + on_commit = txn_alter_trigger_new( + on_replace_cluster_update_quorum, replica); + if (on_commit == NULL) + return -1; + txn_stmt_on_commit(stmt, on_commit); } return 0; } diff --git a/src/box/replication.cc b/src/box/replication.cc index 5b7c76afd4..213318c272 100644 --- a/src/box/replication.cc +++ b/src/box/replication.cc @@ -413,7 +413,6 @@ replica_clear_id(struct replica *replica) assert(!replica->anon); replica_delete(replica); } - box_update_replication_synchro_quorum(); box_broadcast_ballot(); } -- GitLab