From 9b63ced353eaf6c1224358c7d3655ca52f7d21fb 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> --- 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 2d1565b26c..e829bfdfc6 100644 --- a/src/box/alter.cc +++ b/src/box/alter.cc @@ -4719,6 +4719,11 @@ on_replace_dd_cluster_delete(const struct replica_def *old_def) 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 2a26a446ee..ef10830bd6 100644 --- a/src/box/replication.cc +++ b/src/box/replication.cc @@ -448,7 +448,6 @@ replica_clear_id(struct replica *replica) assert(!replica->anon); replica_delete(replica); } - box_update_replication_synchro_quorum(); box_broadcast_ballot(); } -- GitLab