Rechercher dans le manuel MySQL
17.4.1.31 Replication Retries and Timeouts
The global system variable
slave_transaction_retries
sets
the maximum number of times for applier threads on a
single-threaded or multithreaded replication slave to
automatically retry failed transactions before stopping.
Transactions are automatically retried when the SQL thread fails
to execute them because of an InnoDB
deadlock, or when the transaction's execution time exceeds the
InnoDB
innodb_lock_wait_timeout
value.
If a transaction has a non-temporary error that will prevent it
from ever succeeding, it is not retried.
The default setting for
slave_transaction_retries
is
10, meaning that a failing transaction with an apparently
temporary error is retried 10 times before the applier thread
stops. Setting the variable to 0 disables automatic retrying of
transactions. On a multithreaded slave, the specified number of
transaction retries can take place on all applier threads of all
channels. The Performance Schema table
replication_applier_status
shows
the total number of transaction retries that took place on each
replication channel, in the
COUNT_TRANSACTIONS_RETRIES
column.
The process of retrying transactions can cause lag on a
replication slave or on a Group Replication group member, which
can be configured as a single-threaded or multithreaded slave.
The Performance Schema table
replication_applier_status_by_worker
shows detailed information on transaction retries by the applier
threads on a single-threaded or multithreaded slave. This data
includes timestamps showing how long it took the applier thread
to apply the last transaction from start to finish (and when the
transaction currently in progress was started), and how long
this was after the commit on the original master and the
immediate master. The data also shows the number of retries for
the last transaction and the transaction currently in progress,
and enables you to identify the transient errors that caused the
transactions to be retried. You can use this information to see
whether transaction retries are the cause of replication lag,
and investigate the root cause of the failures that led to the
retries.
Traduction non disponible
Le manuel MySQL n'est pas encore traduit en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.
Document créé le 26/06/2006, dernière modification le 26/10/2018
Source du document imprimé : https://www.gaudry.be/mysql-rf-replication-features-timeout.html
L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.
Références
Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.