mirror of
https://github.com/MariaDB/server.git
synced 2025-11-29 17:09:44 +01:00
`rpl_semi_sync_master_wait_for_slave_count` is a long-requested
variable specifying the minimum number of acknowledging replicas
before a semi-synchronous transaction can complete on the primary.
Note that changing this variable in the middle of a transaction waiting
for more replicas is supported: The transaction will complete if it
drops to no more than the number of acknowledgements already received.
Consequently, its purpose also leads it to indirectly control the number
of replicas required to keep semi-synchronous replication active when
`rpl_semi_sync_master_wait_no_slave` is set to disable immediately
(i.e. auto-revert to asynchronous).
This commit also deduplicates code in `sql/semisync_master.cc`:
* Create reüsable functions
`is_no_slave()` & `Active_tranx::get_tranx_node()`
* Changed `Active_tranx:clear_active_tranx_nodes()` from locating
nodes with the given position to use a pointer given by callers
so they make use of this `get_tranx_node()` or an alternative.
* Inline `signal_waiting_transaction()`
* Replace `Active_tranx::is_thd_waiter()` with the
equivalent method `Active_tranx::is_tranx_end_pos()`
Reviewed-by: Brandon Nesterenko <brandon.nesterenko@mariadb.com>
|
||
|---|---|---|
| .. | ||
| inc | ||
| r | ||
| t | ||
| disabled.def | ||