8.4 中文镜像

MySQL 8.4 参考手册 · 中文镜像

正文为中文,英文原文默认隐藏。点击任意中文段落即可展开 / 收起对应英文原文。

打开官方英文原文 ↗

译文由机器翻译生成,仅供理解参考;有疑问请以官方英文原文为准。

中文点击中文段落可显示 / 隐藏英文原文本页译文覆盖 100%

10.14.6 复制 SQL 线程状态10.14.6 Replication SQL Thread States

下面的列表显示了在副本服务器上,复制 SQL 线程的 State 列中您可能看到的最常见状态。The following list shows the most common states you may see in the State column for a replication SQL thread on a replica server.

在 MySQL 8.0 中,对监控指标名称进行了不兼容的更改。使用这些监控指标名称的监控工具可能会受到影响。如果这些不兼容的更改对您有影响,请将 terminology_use_previous 系统变量设置为 BEFORE_8_0_26,以使 MySQL 服务器使用前面列表中指定对象的旧名称版本。这可以使依赖旧名称的监控工具继续工作,直到它们可以更新以使用新名称为止。In MySQL 8.0, incompatible changes were made to instrumentation names. Monitoring tools that work with these instrumentation names might be impacted. If the incompatible changes have an impact for you, set the terminology_use_previous system variable to BEFORE_8_0_26 to make MySQL Server use the old versions of the names for the objects specified in the previous list. This enables monitoring tools that rely on the old names to continue working until they can be updated to use the new names.

将 terminology_use_previous 系统变量设置为会话范围以支持单独函数,或设置为全局范围以作为所有新会话的默认值。当使用全局范围时,慢查询日志包含名称的旧版本。Set the terminology_use_previous system variable with session scope to support individual functions, or global scope to be a default for all new sessions. When global scope is used, the slow query log contains the old versions of the names.

  • Making temporary file (append) before replaying LOAD DATA INFILE Making temporary file (append) before replaying LOAD DATA INFILE

    线程正在执行一个 LOAD DATA 语句,并将数据追加到一个临时文件中,该文件包含副本读取行的数据。The thread is executing a LOAD DATA statement and is appending the data to a temporary file containing the data from which the replica reads rows.

  • Making temporary file (create) before replaying LOAD DATA INFILE Making temporary file (create) before replaying LOAD DATA INFILE

    线程正在执行一个 LOAD DATA 语句,并创建一个临时文件,其中包含副本读取行的数据。只有当原始 LOAD DATA 语句由运行版本低于 MySQL 5.0.3 的源记录时,才会遇到这种状态。The thread is executing a LOAD DATA statement and is creating a temporary file containing the data from which the replica reads rows. This state can only be encountered if the original LOAD DATA statement was logged by a source running a version of MySQL lower than MySQL 5.0.3.

  • Reading event from the relay log Reading event from the relay log

    该线程已经从中继日志中读取了一个事件,以便可以处理该事件。The thread has read an event from the relay log so that the event can be processed.

  • Slave has read all relay log; waiting for more updates Slave has read all relay log; waiting for more updates

    Replica has read all relay log; waiting for more updates Replica has read all relay log; waiting for more updates

    该线程已处理完中继日志文件中的所有事件,现在正在等待 I/O(接收)线程将新事件写入中继日志。The thread has processed all events in the relay log files, and is now waiting for the I/O (receiver) thread to write new events to the relay log.

  • Waiting for an event from Coordinator Waiting for an event from Coordinator

    使用多线程副本(replica_parallel_workers 大于 1 时),其中一个副本工作线程正在等待协调器线程的事件。Using the multithreaded replica (replica_parallel_workers is greater than 1), one of the replica worker threads is waiting for an event from the coordinator thread.

  • Waiting for slave mutex on exit Waiting for slave mutex on exit

    Waiting for replica mutex on exit Waiting for replica mutex on exit

    在线程停止时发生的非常短暂的状态。A very brief state that occurs as the thread is stopping.

  • Waiting for Slave Workers to free pending events Waiting for Slave Workers to free pending events

    Waiting for Replica Workers to free pending events Waiting for Replica Workers to free pending events

    当工作线程正在处理的事件总大小超过系统变量 replica_pending_jobs_size_max 的大小时,会发生这种等待操作。当大小降到此限制以下时,协调器会恢复调度。仅当 replica_parallel_workers 设置大于 0 时,才会出现这种状态。This waiting action occurs when the total size of events being processed by Workers exceeds the size of the replica_pending_jobs_size_max system variable. The Coordinator resumes scheduling when the size drops below this limit. This state occurs only when replica_parallel_workers is set greater than 0.

  • Waiting for the next event in relay log Waiting for the next event in relay log

    在 Reading event from the relay log 之前的初始状态。The initial state before Reading event from the relay log.

  • Waiting until SOURCE_DELAY seconds after source executed event Waiting until SOURCE_DELAY seconds after source executed event

    SQL 线程已经读取了一个事件,但正在等待副本延迟过期。此延迟通过 CHANGE REPLICATION SOURCE TO 的 SOURCE_DELAY 选项设置。The SQL thread has read an event but is waiting for the replica delay to lapse. This delay is set with the SOURCE_DELAY option of the CHANGE REPLICATION SOURCE TO.

SQL 线程的 Info 列也可能显示语句的文本。这表明线程已经从中继日志中读取了一个事件,从中提取了语句,并可能正在执行它。The Info column for the SQL thread may also show the text of a statement. This indicates that the thread has read an event from the relay log, extracted the statement from it, and may be executing it.