<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="performance-schema-replication-applier-status-by-worker-table">
      </a>
      29.12.11.7 The replication_applier_status_by_worker Table
     </h4>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045071337872">
  </a>
  <a class="indexterm" name="idm46045071336368">
  </a>
  <p>
   This table provides details of the transactions handled by
          applier threads on a replica or Group Replication group
          member. For a single-threaded replica, data is shown for the
          replica's single applier thread. For a multithreaded
          replica, data is shown individually for each applier thread.
          The applier threads on a multithreaded replica are sometimes
          called workers. The number of applier threads on a replica or
          Group Replication group member is set by the
   <a class="link" href="replication-options-replica.html#sysvar_replica_parallel_workers">
    <code class="literal">
     replica_parallel_workers
    </code>
   </a>
   system variable, which is set to zero for a single-threaded
          replica. A multithreaded replica also has a coordinator thread
          to manage the applier threads, and the status of this thread
          is shown in the
   <a class="link" href="performance-schema-replication-applier-status-by-coordinator-table.html" title="29.12.11.6 The replication_applier_status_by_coordinator Table">
    <code class="literal">
     replication_applier_status_by_coordinator
    </code>
   </a>
   table.
  </p>
  <p>
   All error codes and messages displayed in the columns relating
          to errors correspond to error values listed in
   <a class="ulink" href="/doc/mysql-errors/8.4/en/server-error-reference.html" target="_top">
    Server Error Message Reference
   </a>
   .
  </p>
  <p>
   When the Performance Schema is disabled, local timing
          information is not collected, so the fields showing the start
          and end timestamps for applied transactions are zero. The
          start timestamps in this table refer to when the worker
          started applying the first event, and the end timestamps refer
          to when the last event of the transaction was applied.
  </p>
  <p>
   When a replica is restarted by a
   <a class="link" href="start-replica.html" title="15.4.2.4 START REPLICA Statement">
    <code class="literal">
     START
          REPLICA
    </code>
   </a>
   statement, the columns beginning
   <code class="literal">
    APPLYING_TRANSACTION
   </code>
   are reset.
  </p>
  <p>
   The
   <a class="link" href="performance-schema-replication-applier-status-by-worker-table.html" title="29.12.11.7 The replication_applier_status_by_worker Table">
    <code class="literal">
     replication_applier_status_by_worker
    </code>
   </a>
   table has these columns:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <code class="literal">
       CHANNEL_NAME
      </code>
     </p>
     <p>
      The replication channel which this row is displaying.
              There is always a default replication channel, and more
              replication channels can be added. See
      <a class="xref" href="replication-channels.html" title="19.2.2 Replication Channels">
       Section 19.2.2, “Replication Channels”
      </a>
      for more
              information.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       WORKER_ID
      </code>
     </p>
     <p>
      The worker identifier (same value as the
      <code class="literal">
       id
      </code>
      column in the
      <code class="literal">
       mysql.slave_worker_info
      </code>
      table). After
      <a class="link" href="stop-replica.html" title="15.4.2.5 STOP REPLICA Statement">
       <code class="literal">
        STOP
              REPLICA
       </code>
      </a>
      , the
      <code class="literal">
       THREAD_ID
      </code>
      column
              becomes
      <code class="literal">
       NULL
      </code>
      , but the
      <code class="literal">
       WORKER_ID
      </code>
      value is preserved.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       THREAD_ID
      </code>
     </p>
     <p>
      The worker thread ID.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       SERVICE_STATE
      </code>
     </p>
     <p>
      <code class="literal">
       ON
      </code>
      (thread exists and is active or
              idle) or
      <code class="literal">
       OFF
      </code>
      (thread no longer exists).
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       LAST_ERROR_NUMBER
      </code>
      ,
      <code class="literal">
       LAST_ERROR_MESSAGE
      </code>
     </p>
     <p>
      The error number and error message of the most recent
              error that caused the worker thread to stop. An error
              number of 0 and message of the empty string mean
      <span class="quote">
       “
       <span class="quote">
        no
              error
       </span>
       ”
      </span>
      . If the
      <code class="literal">
       LAST_ERROR_MESSAGE
      </code>
      value is not empty,
              the error values also appear in the replica's error
              log.
     </p>
     <p>
      Issuing
      <a class="link" href="reset-binary-logs-and-gtids.html" title="15.4.1.2 RESET BINARY LOGS AND GTIDS Statement">
       <code class="literal">
        RESET BINARY LOGS AND
              GTIDS
       </code>
      </a>
      or
      <a class="link" href="reset-replica.html" title="15.4.2.3 RESET REPLICA Statement">
       <code class="literal">
        RESET
              REPLICA
       </code>
      </a>
      resets the values shown in these
              columns.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       LAST_ERROR_TIMESTAMP
      </code>
     </p>
     <p>
      A timestamp in
      <code class="literal">
       '
       <em class="replaceable">
        <code>
         YYYY-MM-DD
              hh:mm:ss
        </code>
       </em>
       [.
       <em class="replaceable">
        <code>
         fraction
        </code>
       </em>
       ]'
      </code>
      format that shows when the most recent worker error
              occurred.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       LAST_APPLIED_TRANSACTION
      </code>
     </p>
     <p>
      The global transaction ID (GTID) of the last transaction
              applied by this worker.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       LAST_APPLIED_TRANSACTION_ORIGINAL_COMMIT_TIMESTAMP
      </code>
     </p>
     <p>
      A timestamp in
      <code class="literal">
       '
       <em class="replaceable">
        <code>
         YYYY-MM-DD
              hh:mm:ss
        </code>
       </em>
       [.
       <em class="replaceable">
        <code>
         fraction
        </code>
       </em>
       ]'
      </code>
      format that shows when the last transaction applied by
              this worker was committed on the original source.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       LAST_APPLIED_TRANSACTION_IMMEDIATE_COMMIT_TIMESTAMP
      </code>
     </p>
     <p>
      A timestamp in
      <code class="literal">
       '
       <em class="replaceable">
        <code>
         YYYY-MM-DD
              hh:mm:ss
        </code>
       </em>
       [.
       <em class="replaceable">
        <code>
         fraction
        </code>
       </em>
       ]'
      </code>
      format that shows when the last transaction applied by
              this worker was committed on the immediate source.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       LAST_APPLIED_TRANSACTION_START_APPLY_TIMESTAMP
      </code>
     </p>
     <p>
      A timestamp in
      <code class="literal">
       '
       <em class="replaceable">
        <code>
         YYYY-MM-DD
              hh:mm:ss
        </code>
       </em>
       [.
       <em class="replaceable">
        <code>
         fraction
        </code>
       </em>
       ]'
      </code>
      format that shows when this worker started applying the
              last applied transaction.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       LAST_APPLIED_TRANSACTION_END_APPLY_TIMESTAMP
      </code>
     </p>
     <p>
      A timestamp in
      <code class="literal">
       '
       <em class="replaceable">
        <code>
         YYYY-MM-DD
              hh:mm:ss
        </code>
       </em>
       [.
       <em class="replaceable">
        <code>
         fraction
        </code>
       </em>
       ]'
      </code>
      format that shows when this worker finished applying the
              last applied transaction.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       APPLYING_TRANSACTION
      </code>
     </p>
     <p>
      The global transaction ID (GTID) of the transaction this
              worker is currently applying.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       APPLYING_TRANSACTION_ORIGINAL_COMMIT_TIMESTAMP
      </code>
     </p>
     <p>
      A timestamp in
      <code class="literal">
       '
       <em class="replaceable">
        <code>
         YYYY-MM-DD
              hh:mm:ss
        </code>
       </em>
       [.
       <em class="replaceable">
        <code>
         fraction
        </code>
       </em>
       ]'
      </code>
      format that shows when the transaction this worker is
              currently applying was committed on the original source.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       APPLYING_TRANSACTION_IMMEDIATE_COMMIT_TIMESTAMP
      </code>
     </p>
     <p>
      A timestamp in
      <code class="literal">
       '
       <em class="replaceable">
        <code>
         YYYY-MM-DD
              hh:mm:ss
        </code>
       </em>
       [.
       <em class="replaceable">
        <code>
         fraction
        </code>
       </em>
       ]'
      </code>
      format that shows when the transaction this worker is
              currently applying was committed on the immediate source.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       APPLYING_TRANSACTION_START_APPLY_TIMESTAMP
      </code>
     </p>
     <p>
      A timestamp in
      <code class="literal">
       '
       <em class="replaceable">
        <code>
         YYYY-MM-DD
              hh:mm:ss
        </code>
       </em>
       [.
       <em class="replaceable">
        <code>
         fraction
        </code>
       </em>
       ]'
      </code>
      format that shows when this worker started its first
              attempt to apply the transaction that is currently being
              applied.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       LAST_APPLIED_TRANSACTION_RETRIES_COUNT
      </code>
     </p>
     <p>
      The number of times the last applied transaction was
              retried by the worker after the first attempt. If the
              transaction was applied at the first attempt, this number
              is zero.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       LAST_APPLIED_TRANSACTION_LAST_TRANSIENT_ERROR_NUMBER
      </code>
     </p>
     <p>
      The error number of the last transient error that caused
              the transaction to be retried.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       LAST_APPLIED_TRANSACTION_LAST_TRANSIENT_ERROR_MESSAGE
      </code>
     </p>
     <p>
      The message text for the last transient error that caused
              the transaction to be retried.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       LAST_APPLIED_TRANSACTION_LAST_TRANSIENT_ERROR_TIMESTAMP
      </code>
     </p>
     <p>
      A timestamp in
      <code class="literal">
       '
       <em class="replaceable">
        <code>
         YYYY-MM-DD
              hh:mm:ss
        </code>
       </em>
       [.
       <em class="replaceable">
        <code>
         fraction
        </code>
       </em>
       ]'
      </code>
      format for the last transient error that caused the
              transaction to be retried.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       APPLYING_TRANSACTION_RETRIES_COUNT
      </code>
     </p>
     <p>
      The number of times the transaction that is currently
              being applied was retried until this moment. If the
              transaction was applied at the first attempt, this number
              is zero.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       APPLYING_TRANSACTION_LAST_TRANSIENT_ERROR_NUMBER
      </code>
     </p>
     <p>
      The error number of the last transient error that caused
              the current transaction to be retried.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       APPLYING_TRANSACTION_LAST_TRANSIENT_ERROR_MESSAGE
      </code>
     </p>
     <p>
      The message text for the last transient error that caused
              the current transaction to be retried.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       APPLYING_TRANSACTION_LAST_TRANSIENT_ERROR_TIMESTAMP
      </code>
     </p>
     <p>
      A timestamp in
      <code class="literal">
       '
       <em class="replaceable">
        <code>
         YYYY-MM-DD
              hh:mm:ss
        </code>
       </em>
       [.
       <em class="replaceable">
        <code>
         fraction
        </code>
       </em>
       ]'
      </code>
      format for the last transient error that caused the
              current transaction to be retried.
     </p>
    </li>
   </ul>
  </div>
  <p>
   The
   <a class="link" href="performance-schema-replication-applier-status-by-worker-table.html" title="29.12.11.7 The replication_applier_status_by_worker Table">
    <code class="literal">
     replication_applier_status_by_worker
    </code>
   </a>
   table has these indexes:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      Primary key on (
      <code class="literal">
       CHANNEL_NAME
      </code>
      ,
      <code class="literal">
       WORKER_ID
      </code>
      )
     </p>
    </li>
    <li class="listitem">
     <p>
      Index on (
      <code class="literal">
       THREAD_ID
      </code>
      )
     </p>
    </li>
   </ul>
  </div>
  <p>
   The following table shows the correspondence between
   <a class="link" href="performance-schema-replication-applier-status-by-worker-table.html" title="29.12.11.7 The replication_applier_status_by_worker Table">
    <code class="literal">
     replication_applier_status_by_worker
    </code>
   </a>
   columns and
   <a class="link" href="show-replica-status.html" title="15.7.7.35 SHOW REPLICA STATUS Statement">
    <code class="literal">
     SHOW
          REPLICA STATUS
    </code>
   </a>
   columns.
  </p>
  <div class="informaltable">
   <table summary="Correspondence between replication_applier_status_by_worker columns and SHOW REPLICA STATUS columns">
    <colgroup>
     <col style="width: 60%"/>
     <col style="width: 40%"/>
    </colgroup>
    <thead>
     <tr>
      <th>
       <code class="literal">
        replication_applier_status_by_worker
       </code>
       Column
      </th>
      <th>
       <code class="literal">
        SHOW REPLICA STATUS
       </code>
       Column
      </th>
     </tr>
    </thead>
    <tbody>
     <tr>
      <td>
       <code class="literal">
        WORKER_ID
       </code>
      </td>
      <td>
       None
      </td>
     </tr>
     <tr>
      <td>
       <code class="literal">
        THREAD_ID
       </code>
      </td>
      <td>
       None
      </td>
     </tr>
     <tr>
      <td>
       <code class="literal">
        SERVICE_STATE
       </code>
      </td>
      <td>
       None
      </td>
     </tr>
     <tr>
      <td>
       <code class="literal">
        LAST_ERROR_NUMBER
       </code>
      </td>
      <td>
       <code class="literal">
        Last_SQL_Errno
       </code>
      </td>
     </tr>
     <tr>
      <td>
       <code class="literal">
        LAST_ERROR_MESSAGE
       </code>
      </td>
      <td>
       <code class="literal">
        Last_SQL_Error
       </code>
      </td>
     </tr>
     <tr>
      <td>
       <code class="literal">
        LAST_ERROR_TIMESTAMP
       </code>
      </td>
      <td>
       <code class="literal">
        Last_SQL_Error_Timestamp
       </code>
      </td>
     </tr>
    </tbody>
   </table>
  </div>
 </div>
 <br/>
</div>
