Skip to content

Commit 9b63ced

Browse files
CuriousGeorgiyGerold103
authored andcommitted
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 tarantool#10087 NO_CHANGELOG=<refactoring> NO_DOC=<refactoring> NO_TEST=<refactoring>
1 parent 29d1c0f commit 9b63ced

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/box/alter.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4719,6 +4719,11 @@ on_replace_dd_cluster_delete(const struct replica_def *old_def)
47194719
if (on_commit == NULL)
47204720
return -1;
47214721
txn_stmt_on_commit(stmt, on_commit);
4722+
on_commit = txn_alter_trigger_new(
4723+
on_replace_cluster_update_quorum, replica);
4724+
if (on_commit == NULL)
4725+
return -1;
4726+
txn_stmt_on_commit(stmt, on_commit);
47224727
return 0;
47234728
}
47244729

src/box/replication.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,6 @@ replica_clear_id(struct replica *replica)
448448
assert(!replica->anon);
449449
replica_delete(replica);
450450
}
451-
box_update_replication_synchro_quorum();
452451
box_broadcast_ballot();
453452
}
454453

0 commit comments

Comments
 (0)