<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="clone-plugin-monitoring">
      </a>
      7.6.7.10 Monitoring Cloning Operations
     </h4>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045255312400">
  </a>
  <a class="indexterm" name="idm46045255310944">
  </a>
  <p>
   This section describes options for monitoring cloning
        operations.
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <a class="xref" href="clone-plugin-monitoring.html#clone-plugin-monitoring-performance-schema-clone-tables" title="Monitoring Cloning Operations using Performance Schema Clone Tables">
       Monitoring Cloning Operations using Performance Schema Clone Tables
      </a>
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="xref" href="clone-plugin-monitoring.html#clone-plugin-monitoring-stage-events" title="Monitoring Cloning Operations Using Performance Schema Stage Events">
       Monitoring Cloning Operations Using Performance Schema Stage Events
      </a>
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="xref" href="clone-plugin-monitoring.html#clone-plugin-performance-schema-instruments" title="Monitoring Cloning Operations Using Performance Schema Clone Instrumentation">
       Monitoring Cloning Operations Using Performance Schema Clone
Instrumentation
      </a>
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="xref" href="clone-plugin-monitoring.html#clone-plugin-com-clone" title="The Com_clone Status Variable">
       The Com_clone Status Variable
      </a>
     </p>
    </li>
   </ul>
  </div>
  <div class="simplesect">
   <div class="titlepage">
    <div>
     <div class="simple">
      <h5 class="title">
       <a name="clone-plugin-monitoring-performance-schema-clone-tables">
       </a>
       Monitoring Cloning Operations using Performance Schema Clone Tables
      </h5>
     </div>
    </div>
   </div>
   <a class="indexterm" name="idm46045255303600">
   </a>
   <a class="indexterm" name="idm46045255302144">
   </a>
   <a class="indexterm" name="idm46045255300656">
   </a>
   <a class="indexterm" name="idm46045255299584">
   </a>
   <p>
    A cloning operation may take some time to complete, depending
          on the amount of data and other factors related to data
          transfer. You can monitor the status and progress of a cloning
          operation on the recipient MySQL server instance using the
    <a class="link" href="performance-schema-clone-status-table.html" title="29.12.19.1 The clone_status Table">
     <code class="literal">
      clone_status
     </code>
    </a>
    and
    <a class="link" href="performance-schema-clone-progress-table.html" title="29.12.19.2 The clone_progress Table">
     <code class="literal">
      clone_progress
     </code>
    </a>
    Performance Schema
          tables.
   </p>
   <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
    <div class="admon-title">
     Note
    </div>
    <p>
     The
     <a class="link" href="performance-schema-clone-status-table.html" title="29.12.19.1 The clone_status Table">
      <code class="literal">
       clone_status
      </code>
     </a>
     and
     <a class="link" href="performance-schema-clone-progress-table.html" title="29.12.19.2 The clone_progress Table">
      <code class="literal">
       clone_progress
      </code>
     </a>
     Performance
            Schema tables can be used to monitor a cloning operation on
            the recipient MySQL server instance only. To monitor a
            cloning operation on the donor MySQL server instance, use
            the clone stage events, as described in
     <a class="xref" href="clone-plugin-monitoring.html#clone-plugin-monitoring-stage-events" title="Monitoring Cloning Operations Using Performance Schema Stage Events">
      Monitoring Cloning Operations Using Performance Schema Stage Events
     </a>
     .
    </p>
   </div>
   <div class="itemizedlist">
    <ul class="itemizedlist" style="list-style-type: disc; ">
     <li class="listitem">
      <p>
       The
       <a class="link" href="performance-schema-clone-status-table.html" title="29.12.19.1 The clone_status Table">
        <code class="literal">
         clone_status
        </code>
       </a>
       table
              provides the state of the current or last executed cloning
              operation. A clone operation has four possible states:
       <code class="literal">
        Not Started
       </code>
       ,
       <code class="literal">
        In
              Progress
       </code>
       ,
       <code class="literal">
        Completed
       </code>
       , and
       <code class="literal">
        Failed
       </code>
       .
      </p>
     </li>
     <li class="listitem">
      <p>
       The
       <a class="link" href="performance-schema-clone-progress-table.html" title="29.12.19.2 The clone_progress Table">
        <code class="literal">
         clone_progress
        </code>
       </a>
       table
              provides progress information for the current or last
              executed clone operation, by stage. The stages of a
              cloning operation include
       <code class="literal">
        DROP DATA
       </code>
       ,
       <code class="literal">
        FILE COPY
       </code>
       ,
       <code class="literal">
        PAGE_COPY
       </code>
       ,
       <code class="literal">
        REDO_COPY
       </code>
       ,
       <code class="literal">
        FILE_SYNC
       </code>
       ,
       <code class="literal">
        RESTART
       </code>
       ,
              and
       <code class="literal">
        RECOVERY
       </code>
       .
      </p>
     </li>
    </ul>
   </div>
   <p>
    The
    <a class="link" href="privileges-provided.html#priv_select">
     <code class="literal">
      SELECT
     </code>
    </a>
    and
    <a class="link" href="privileges-provided.html#priv_execute">
     <code class="literal">
      EXECUTE
     </code>
    </a>
    privileges on the
          Performance Schema is required to access the Performance
          Schema clone tables.
   </p>
   <p>
    To check the state of a cloning operation:
   </p>
   <div class="orderedlist">
    <ol class="orderedlist" type="1">
     <li class="listitem">
      <p>
       Connect to the recipient MySQL server instance.
      </p>
     </li>
     <li class="listitem">
      <p>
       Query the
       <a class="link" href="performance-schema-clone-status-table.html" title="29.12.19.1 The clone_status Table">
        <code class="literal">
         clone_status
        </code>
       </a>
       table:
      </p>
      <div class="copytoclipboard-wrapper">
       <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa92897283"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql&gt;</span> <span class="token keyword">SELECT</span> STATE <span class="token keyword">FROM</span> performance_schema<span class="token punctuation">.</span>clone_status<span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> STATE     <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> Completed <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
      </div>
     </li>
    </ol>
   </div>
   <p>
    Should a failure occur during a cloning operation, you can
          query the
    <a class="link" href="performance-schema-clone-status-table.html" title="29.12.19.1 The clone_status Table">
     <code class="literal">
      clone_status
     </code>
    </a>
    table for
          error information:
   </p>
   <div class="copytoclipboard-wrapper">
    <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa76272339"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql&gt;</span> <span class="token keyword">SELECT</span> STATE<span class="token punctuation">,</span> ERROR_NO<span class="token punctuation">,</span> ERROR_MESSAGE <span class="token keyword">FROM</span> performance_schema<span class="token punctuation">.</span>clone_status<span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> STATE     <span class="token punctuation">|</span> ERROR_NO <span class="token punctuation">|</span> ERROR_MESSAGE <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> Failed    <span class="token punctuation">|</span>      xxx <span class="token punctuation">|</span> "xxxxxxxxxxx" <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
   </div>
   <p>
    To review the details of each stage of a cloning operation:
   </p>
   <div class="orderedlist">
    <ol class="orderedlist" type="1">
     <li class="listitem">
      <p>
       Connect to the recipient MySQL server instance.
      </p>
     </li>
     <li class="listitem">
      <p>
       Query the
       <a class="link" href="performance-schema-clone-progress-table.html" title="29.12.19.2 The clone_progress Table">
        <code class="literal">
         clone_progress
        </code>
       </a>
       table. For example, the following query provides state and
              end time data for each stage of the cloning operation:
      </p>
      <div class="copytoclipboard-wrapper">
       <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa89118896"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql&gt;</span> <span class="token keyword">SELECT</span> STAGE<span class="token punctuation">,</span> STATE<span class="token punctuation">,</span> END_TIME <span class="token keyword">FROM</span> performance_schema<span class="token punctuation">.</span>clone_progress<span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> stage     <span class="token punctuation">|</span> state     <span class="token punctuation">|</span> end_time                   <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> DROP DATA <span class="token punctuation">|</span> Completed <span class="token punctuation">|</span> 2019<span class="token punctuation">-</span>01<span class="token punctuation">-</span>27 22:45:43.141261 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> FILE COPY <span class="token punctuation">|</span> Completed <span class="token punctuation">|</span> 2019<span class="token punctuation">-</span>01<span class="token punctuation">-</span>27 22:45:44.457572 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> PAGE COPY <span class="token punctuation">|</span> Completed <span class="token punctuation">|</span> 2019<span class="token punctuation">-</span>01<span class="token punctuation">-</span>27 22:45:44.577330 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> REDO COPY <span class="token punctuation">|</span> Completed <span class="token punctuation">|</span> 2019<span class="token punctuation">-</span>01<span class="token punctuation">-</span>27 22:45:44.679570 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> FILE SYNC <span class="token punctuation">|</span> Completed <span class="token punctuation">|</span> 2019<span class="token punctuation">-</span>01<span class="token punctuation">-</span>27 22:45:44.918547 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> RESTART   <span class="token punctuation">|</span> Completed <span class="token punctuation">|</span> 2019<span class="token punctuation">-</span>01<span class="token punctuation">-</span>27 22:45:48.583565 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> RECOVERY  <span class="token punctuation">|</span> Completed <span class="token punctuation">|</span> 2019<span class="token punctuation">-</span>01<span class="token punctuation">-</span>27 22:45:49.626595 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
      </div>
      <p>
       For other clone status and progress data points that you
              can monitor, refer to
       <a class="xref" href="performance-schema-clone-tables.html" title="29.12.19 Performance Schema Clone Tables">
        Section 29.12.19, “Performance Schema Clone Tables”
       </a>
       .
      </p>
     </li>
    </ol>
   </div>
  </div>
  <div class="simplesect">
   <div class="titlepage">
    <div>
     <div class="simple">
      <h5 class="title">
       <a name="clone-plugin-monitoring-stage-events">
       </a>
       Monitoring Cloning Operations Using Performance Schema Stage Events
      </h5>
     </div>
    </div>
   </div>
   <a class="indexterm" name="idm46045255256000">
   </a>
   <p>
    A cloning operation may take some time to complete, depending
          on the amount of data and other factors related to data
          transfer. There are three stage events for monitoring the
          progress of a cloning operation. Each stage event reports
    <code class="literal">
     <code class="literal">
      WORK_COMPLETED
     </code>
    </code>
    and
    <code class="literal">
     <code class="literal">
      WORK_ESTIMATED
     </code>
    </code>
    values.
          Reported values are revised as the operation progresses.
   </p>
   <p>
    This method of monitoring a cloning operation can be used on
          the donor or recipient MySQL server instance.
   </p>
   <p>
    In order of occurrence, cloning operation stage events
          include:
   </p>
   <div class="itemizedlist">
    <ul class="itemizedlist" style="list-style-type: disc; ">
     <li class="listitem">
      <p>
       <code class="literal">
        stage/innodb/clone (file copy)
       </code>
       :
              Indicates progress of the file copy phase of the cloning
              operation.
       <code class="literal">
        <code class="literal">
         WORK_ESTIMATED
        </code>
       </code>
       and
       <code class="literal">
        <code class="literal">
         WORK_COMPLETED
        </code>
       </code>
       units
              are file chunks. The number of files to be transferred is
              known at the start of the file copy phase, and the number
              of chunks is estimated based on the number of files.
       <code class="literal">
        WORK_ESTIMATED
       </code>
       is set to the number of
              estimated file chunks.
       <code class="literal">
        WORK_COMPLETED
       </code>
       is updated after each chunk is sent.
      </p>
     </li>
     <li class="listitem">
      <p>
       <code class="literal">
        stage/innodb/clone (page copy)
       </code>
       :
              Indicates progress of the page copy phase of cloning
              operation.
       <code class="literal">
        WORK_ESTIMATED
       </code>
       and
       <code class="literal">
        WORK_COMPLETED
       </code>
       units are pages. Once
              the file copy phase is completed, the number of pages to
              be transferred is known, and
       <code class="literal">
        WORK_ESTIMATED
       </code>
       is set to this value.
       <code class="literal">
        WORK_COMPLETED
       </code>
       is updated after each
              page is sent.
      </p>
     </li>
     <li class="listitem">
      <p>
       <code class="literal">
        stage/innodb/clone (redo copy)
       </code>
       :
              Indicates progress of the redo copy phase of cloning
              operation.
       <code class="literal">
        WORK_ESTIMATED
       </code>
       and
       <code class="literal">
        WORK_COMPLETED
       </code>
       units are redo chunks.
              Once the page copy phase is completed, the number of redo
              chunks to be transferred is known, and
       <code class="literal">
        WORK_ESTIMATED
       </code>
       is set to this value.
       <code class="literal">
        WORK_COMPLETED
       </code>
       is updated after each
              chunk is sent.
      </p>
     </li>
    </ul>
   </div>
   <p>
    The following example demonstrates how to enable
    <code class="literal">
     stage/innodb/clone%
    </code>
    event instruments and
          related consumer tables to monitor a cloning operation. For
          information about Performance Schema stage event instruments
          and related consumers, see
    <a class="xref" href="performance-schema-stage-tables.html" title="29.12.5 Performance Schema Stage Event Tables">
     Section 29.12.5, “Performance Schema Stage Event Tables”
    </a>
    .
   </p>
   <div class="orderedlist">
    <ol class="orderedlist" type="1">
     <li class="listitem">
      <p>
       Enable the
       <code class="literal">
        stage/innodb/clone%
       </code>
       instruments:
      </p>
      <div class="copytoclipboard-wrapper">
       <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa66612239"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql&gt;</span> <span class="token keyword">UPDATE</span> performance_schema<span class="token punctuation">.</span>setup_instruments <span class="token keyword">SET</span> ENABLED <span class="token operator">=</span> <span class="token string">'YES'</span>
       <span class="token keyword">WHERE</span> <span class="token keyword">NAME</span> <span class="token operator">LIKE</span> <span class="token string">'stage/innodb/clone%'</span><span class="token punctuation">;</span></code></pre>
      </div>
     </li>
     <li class="listitem">
      <p>
       Enable the stage event consumer tables, which include
       <a class="link" href="performance-schema-events-stages-current-table.html" title="29.12.5.1 The events_stages_current Table">
        <code class="literal">
         events_stages_current
        </code>
       </a>
       ,
       <a class="link" href="performance-schema-events-stages-history-table.html" title="29.12.5.2 The events_stages_history Table">
        <code class="literal">
         events_stages_history
        </code>
       </a>
       , and
       <a class="link" href="performance-schema-events-stages-history-long-table.html" title="29.12.5.3 The events_stages_history_long Table">
        <code class="literal">
         events_stages_history_long
        </code>
       </a>
       .
      </p>
      <div class="copytoclipboard-wrapper">
       <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa79998953"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql&gt;</span> <span class="token keyword">UPDATE</span> performance_schema<span class="token punctuation">.</span>setup_consumers <span class="token keyword">SET</span> ENABLED <span class="token operator">=</span> <span class="token string">'YES'</span>
       <span class="token keyword">WHERE</span> <span class="token keyword">NAME</span> <span class="token operator">LIKE</span> <span class="token string">'%stages%'</span><span class="token punctuation">;</span></code></pre>
      </div>
     </li>
     <li class="listitem">
      <p>
       Run a cloning operation. In this example, a local data
              directory is cloned to a directory named
       <code class="literal">
        cloned_dir
       </code>
       .
      </p>
      <div class="copytoclipboard-wrapper">
       <pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa57524014"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql&gt;</span> <span class="token keyword">CLONE</span> <span class="token keyword">LOCAL</span> <span class="token keyword">DATA</span> <span class="token keyword">DIRECTORY</span> <span class="token operator">=</span> <span class="token string">'/path/to/cloned_dir'</span><span class="token punctuation">;</span></code></pre>
      </div>
     </li>
     <li class="listitem">
      <p>
       Check the progress of the cloning operation by querying
              the Performance Schema
       <a class="link" href="performance-schema-events-stages-current-table.html" title="29.12.5.1 The events_stages_current Table">
        <code class="literal">
         events_stages_current
        </code>
       </a>
       table.
              The stage event shown differs depending on the cloning
              phase that is in progress. The
       <code class="literal">
        WORK_COMPLETED
       </code>
       column shows the work
              completed. The
       <code class="literal">
        WORK_ESTIMATED
       </code>
       column
              shows the work required in total.
      </p>
      <div class="copytoclipboard-wrapper">
       <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa50232779"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql&gt;</span> <span class="token keyword">SELECT</span> EVENT_NAME<span class="token punctuation">,</span> WORK_COMPLETED<span class="token punctuation">,</span> WORK_ESTIMATED <span class="token keyword">FROM</span> performance_schema<span class="token punctuation">.</span>events_stages_current
       <span class="token keyword">WHERE</span> EVENT_NAME <span class="token operator">LIKE</span> <span class="token string">'stage/innodb/clone%'</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> EVENT_NAME                     <span class="token punctuation">|</span> WORK_COMPLETED <span class="token punctuation">|</span> WORK_ESTIMATED <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> stage/innodb/clone (redo copy) <span class="token punctuation">|</span>              1 <span class="token punctuation">|</span>              1 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
      </div>
      <p>
       The
       <a class="link" href="performance-schema-events-stages-current-table.html" title="29.12.5.1 The events_stages_current Table">
        <code class="literal">
         events_stages_current
        </code>
       </a>
       table returns an empty set if the cloning operation has
              finished. In this case, you can check the
       <a class="link" href="performance-schema-events-stages-history-table.html" title="29.12.5.2 The events_stages_history Table">
        <code class="literal">
         events_stages_history
        </code>
       </a>
       table
              to view event data for the completed operation. For
              example:
      </p>
      <div class="copytoclipboard-wrapper">
       <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa3634943"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql&gt;</span> <span class="token keyword">SELECT</span> EVENT_NAME<span class="token punctuation">,</span> WORK_COMPLETED<span class="token punctuation">,</span> WORK_ESTIMATED <span class="token keyword">FROM</span> events_stages_history
       <span class="token keyword">WHERE</span> EVENT_NAME <span class="token operator">LIKE</span> <span class="token string">'stage/innodb/clone%'</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> EVENT_NAME                     <span class="token punctuation">|</span> WORK_COMPLETED <span class="token punctuation">|</span> WORK_ESTIMATED <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> stage/innodb/clone (file copy) <span class="token punctuation">|</span>            301 <span class="token punctuation">|</span>            301 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> stage/innodb/clone (page copy) <span class="token punctuation">|</span>              0 <span class="token punctuation">|</span>              0 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> stage/innodb/clone (redo copy) <span class="token punctuation">|</span>              1 <span class="token punctuation">|</span>              1 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
      </div>
     </li>
    </ol>
   </div>
  </div>
  <div class="simplesect">
   <div class="titlepage">
    <div>
     <div class="simple">
      <h5 class="title">
       <a name="clone-plugin-performance-schema-instruments">
       </a>
       Monitoring Cloning Operations Using Performance Schema Clone
Instrumentation
      </h5>
     </div>
    </div>
   </div>
   <a class="indexterm" name="idm46045255204320">
   </a>
   <p>
    <a class="link" href="performance-schema.html" title="Chapter 29 MySQL Performance Schema">
     Performance Schema
    </a>
    provides instrumentation for advanced performance monitoring
          of clone operations. To view the available clone
          instrumentation, and issue the following query:
   </p>
   <div class="copytoclipboard-wrapper">
    <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa81823997"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql&gt;</span> <span class="token keyword">SELECT</span> <span class="token keyword">NAME</span><span class="token punctuation">,</span>ENABLED <span class="token keyword">FROM</span> performance_schema<span class="token punctuation">.</span>setup_instruments
       <span class="token keyword">WHERE</span> <span class="token keyword">NAME</span> <span class="token operator">LIKE</span> <span class="token string">'%clone%'</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> NAME                                              <span class="token punctuation">|</span> ENABLED <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> wait/synch/mutex/innodb/clone_snapshot_mutex      <span class="token punctuation">|</span> NO      <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> wait/synch/mutex/innodb/clone_sys_mutex           <span class="token punctuation">|</span> NO      <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> wait/synch/mutex/innodb/clone_task_mutex          <span class="token punctuation">|</span> NO      <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> wait/synch/mutex/group_rpl/LOCK_clone_donor_list  <span class="token punctuation">|</span> NO      <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> wait/synch/mutex/group_rpl/LOCK_clone_handler_run <span class="token punctuation">|</span> NO      <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> wait/synch/mutex/group_rpl/LOCK_clone_query       <span class="token punctuation">|</span> NO      <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> wait/synch/mutex/group_rpl/LOCK_clone_read_mode   <span class="token punctuation">|</span> NO      <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> wait/synch/cond/group_rpl/COND_clone_handler_run  <span class="token punctuation">|</span> NO      <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> wait/io/file/innodb/innodb_clone_file             <span class="token punctuation">|</span> YES     <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> stage/innodb/clone (file copy)                    <span class="token punctuation">|</span> YES     <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> stage/innodb/clone (redo copy)                    <span class="token punctuation">|</span> YES     <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> stage/innodb/clone (page copy)                    <span class="token punctuation">|</span> YES     <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> statement/abstract/clone                          <span class="token punctuation">|</span> YES     <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> statement/clone/local                             <span class="token punctuation">|</span> YES     <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> statement/clone/client                            <span class="token punctuation">|</span> YES     <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> statement/clone/server                            <span class="token punctuation">|</span> YES     <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> memory/innodb/clone                               <span class="token punctuation">|</span> YES     <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> memory/clone/data                                 <span class="token punctuation">|</span> YES     <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
   </div>
   <h6>
    <a name="idm46045255197632">
    </a>
    Wait Instruments
   </h6>
   <p>
    Performance schema wait instruments track events that take
          time. Clone wait event instruments include:
   </p>
   <div class="itemizedlist">
    <ul class="itemizedlist" style="list-style-type: disc; ">
     <li class="listitem">
      <p>
       <code class="literal">
        wait/synch/mutex/innodb/clone_snapshot_mutex
       </code>
       :
              Tracks wait events for the clone snapshot mutex, which
              synchronizes access to the dynamic snapshot object (on the
              donor and recipient) between multiple clone threads.
      </p>
     </li>
     <li class="listitem">
      <p>
       <code class="literal">
        wait/synch/mutex/innodb/clone_sys_mutex
       </code>
       :
              Tracks wait events for the clone sys mutex. There is one
              clone system object in a MySQL server instance. This mutex
              synchronizes access to the clone system object on the
              donor and recipient. It is acquired by clone threads and
              other foreground and background threads.
      </p>
     </li>
     <li class="listitem">
      <p>
       <code class="literal">
        wait/synch/mutex/innodb/clone_task_mutex
       </code>
       :
              Tracks wait events for the clone task mutex, used for
              clone task management. The
       <code class="literal">
        clone_task_mutex
       </code>
       is acquired by clone
              threads.
      </p>
     </li>
     <li class="listitem">
      <p>
       <code class="literal">
        wait/io/file/innodb/innodb_clone_file
       </code>
       :
              Tracks all I/O wait operations for files that clone
              operates on.
      </p>
     </li>
    </ul>
   </div>
   <p>
    For information about monitoring
    <code class="literal">
     InnoDB
    </code>
    mutex waits, see
    <a class="xref" href="monitor-innodb-mutex-waits-performance-schema.html" title="17.16.2 Monitoring InnoDB Mutex Waits Using Performance Schema">
     Section 17.16.2, “Monitoring InnoDB Mutex Waits Using Performance Schema”
    </a>
    .
          For information about monitoring wait events in general, see
    <a class="xref" href="performance-schema-wait-tables.html" title="29.12.4 Performance Schema Wait Event Tables">
     Section 29.12.4, “Performance Schema Wait Event Tables”
    </a>
    .
   </p>
   <h6>
    <a name="idm46045255185440">
    </a>
    Stage Instruments
   </h6>
   <p>
    Performance Schema stage events track steps that occur during
          the statement-execution process. Clone stage event instruments
          include:
   </p>
   <div class="itemizedlist">
    <ul class="itemizedlist" style="list-style-type: disc; ">
     <li class="listitem">
      <p>
       <code class="literal">
        stage/innodb/clone (file copy)
       </code>
       :
              Indicates progress of the file copy phase of the cloning
              operation.
      </p>
     </li>
     <li class="listitem">
      <p>
       <code class="literal">
        stage/innodb/clone (redo copy)
       </code>
       :
              Indicates progress of the redo copy phase of cloning
              operation.
      </p>
     </li>
     <li class="listitem">
      <p>
       <code class="literal">
        stage/innodb/clone (page copy)
       </code>
       :
              Indicates progress of the page copy phase of cloning
              operation.
      </p>
     </li>
    </ul>
   </div>
   <p>
    For information about monitoring cloning operations using
          stage events, see
    <a class="xref" href="clone-plugin-monitoring.html#clone-plugin-monitoring-stage-events" title="Monitoring Cloning Operations Using Performance Schema Stage Events">
     Monitoring Cloning Operations Using Performance Schema Stage Events
    </a>
    . For
          general information about monitoring stage events, see
    <a class="xref" href="performance-schema-stage-tables.html" title="29.12.5 Performance Schema Stage Event Tables">
     Section 29.12.5, “Performance Schema Stage Event Tables”
    </a>
    .
   </p>
   <h6>
    <a name="idm46045255177008">
    </a>
    Statement Instruments
   </h6>
   <p>
    Performance Schema statement events track statement execution.
          When a clone operation is initiated, the different statement
          types tracked by clone statement instruments may be executed
          in parallel. You can observe these statement events in the
          Performance Schema statement event tables. The number of
          statements that execute depends on the
    <a class="link" href="clone-plugin-options-variables.html#sysvar_clone_max_concurrency">
     <code class="literal">
      clone_max_concurrency
     </code>
    </a>
    and
    <a class="link" href="clone-plugin-options-variables.html#sysvar_clone_autotune_concurrency">
     <code class="literal">
      clone_autotune_concurrency
     </code>
    </a>
    settings.
   </p>
   <p>
    Clone statement event instruments include:
   </p>
   <div class="itemizedlist">
    <ul class="itemizedlist" style="list-style-type: disc; ">
     <li class="listitem">
      <p>
       <code class="literal">
        statement/abstract/clone
       </code>
       : Tracks
              statement events for any clone operation before it is
              classified as a local, client, or server operation type.
      </p>
     </li>
     <li class="listitem">
      <p>
       <code class="literal">
        statement/clone/local
       </code>
       : Tracks clone
              statement events for local clone operations; generated
              when executing a
       <a class="link" href="clone.html" title="15.7.5 CLONE Statement">
        <code class="literal">
         CLONE
              LOCAL
        </code>
       </a>
       statement.
      </p>
     </li>
     <li class="listitem">
      <p>
       <code class="literal">
        statement/clone/client
       </code>
       : Tracks remote
              cloning statement events that occur on the recipient MySQL
              server instance; generated when executing a
       <a class="link" href="clone.html" title="15.7.5 CLONE Statement">
        <code class="literal">
         CLONE
              INSTANCE
        </code>
       </a>
       statement on the recipient.
      </p>
     </li>
     <li class="listitem">
      <p>
       <code class="literal">
        statement/clone/server
       </code>
       : Tracks remote
              cloning statement events that occur on the donor MySQL
              server instance; generated when executing a
       <a class="link" href="clone.html" title="15.7.5 CLONE Statement">
        <code class="literal">
         CLONE
              INSTANCE
        </code>
       </a>
       statement on the recipient.
      </p>
     </li>
    </ul>
   </div>
   <p>
    For information about monitoring Performance Schema statement
          events, see
    <a class="xref" href="performance-schema-statement-tables.html" title="29.12.6 Performance Schema Statement Event Tables">
     Section 29.12.6, “Performance Schema Statement Event Tables”
    </a>
    .
   </p>
   <h6>
    <a name="idm46045255160368">
    </a>
    Memory Instruments
   </h6>
   <p>
    Performance Schema memory instruments track memory usage.
          Clone memory usage instruments include:
   </p>
   <div class="itemizedlist">
    <ul class="itemizedlist" style="list-style-type: disc; ">
     <li class="listitem">
      <p>
       <code class="literal">
        memory/innodb/clone
       </code>
       : Tracks memory
              allocated by
       <code class="literal">
        InnoDB
       </code>
       for the dynamic
              snapshot.
      </p>
     </li>
     <li class="listitem">
      <p>
       <code class="literal">
        memory/clone/data
       </code>
       : Tracks memory
              allocated by the clone plugin during a clone operation.
      </p>
     </li>
    </ul>
   </div>
   <p>
    For information about monitoring memory usage using
          Performance Schema, see
    <a class="xref" href="performance-schema-memory-summary-tables.html" title="29.12.20.10 Memory Summary Tables">
     Section 29.12.20.10, “Memory Summary Tables”
    </a>
    .
   </p>
  </div>
  <div class="simplesect">
   <div class="titlepage">
    <div>
     <div class="simple">
      <h5 class="title">
       <a name="clone-plugin-com-clone">
       </a>
       The Com_clone Status Variable
      </h5>
     </div>
    </div>
   </div>
   <a class="indexterm" name="idm46045255152448">
   </a>
   <p>
    The
    <code class="literal">
     <a class="link" href="server-status-variables.html#statvar_Com_xxx">
      Com_clone
     </a>
    </code>
    status variable provides a count of
    <a class="link" href="clone.html" title="15.7.5 CLONE Statement">
     <code class="literal">
      CLONE
     </code>
    </a>
    statement executions.
   </p>
   <p>
    For more information, refer to the discussion about
    <code class="literal">
     <a class="link" href="server-status-variables.html#statvar_Com_xxx">
      Com_xxx
     </a>
    </code>
    statement counter variables in
    <a class="xref" href="server-status-variables.html" title="7.1.10 Server Status Variables">
     Section 7.1.10, “Server Status Variables”
    </a>
    .
   </p>
  </div>
 </div>
 <br/>
</div>
