<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Hello <span style="font-family:arial,sans-serif;font-size:13px">Ravi,</span></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">

<span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><span style="font-family:arial,sans-serif;font-size:13px">Thanks for your reply.</span></div>

<div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">

<span style="font-family:arial,sans-serif;font-size:13px">Sorry that I have a typo in my mail. It should by &quot;underlying corruption&quot; instead of &quot;underlying correction&quot;.</span></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">

<br></div><div class="gmail_default"><font face="arial, sans-serif">I guess the logic of eliminating zero byte files from all innocent nodes is working for preventing underlying corruption to propagate to other brick. Asked in another way, if the underlying brick finds some file is corrupted, anything it could do to tell glusterfs to fix it?</font></div>

<div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">

<span style="font-family:arial">Zhang Huan</span><br></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Thu, Feb 27, 2014 at 7:50 PM, Ravishankar N <span dir="ltr">&lt;<a href="mailto:ravishankar@redhat.com" target="_blank">ravishankar@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">


  
    
  
  <div bgcolor="#FFFFFF" text="#000000"><div class="">
    <div>On 02/26/2014 07:42 PM, Zhang Huan
      wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">
        <div style="font-family:arial,helvetica,sans-serif">Hello guys,</div>
        <div style="font-family:arial,helvetica,sans-serif"><br>
        </div>
        <div style="font-family:arial,helvetica,sans-serif">
          Anyone know about my question?</div>
      </div>
      <div class="gmail_extra"><br clear="all">
        <div>Zhang Huan</div>
        <br>
        <br>
        <div class="gmail_quote">On Sun, Feb 23, 2014 at 11:28 AM, Zhang
          Huan <span dir="ltr">&lt;<a href="mailto:zhhuan@gmail.com" target="_blank">zhhuan@gmail.com</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
            <div dir="ltr">
              <div style="font-family:arial,helvetica,sans-serif">Hello
                all,</div>
              <div style="font-family:arial,helvetica,sans-serif"><br>
              </div>
              <div style="font-family:arial,helvetica,sans-serif">
                While reading codes about how to choose healing source,
                there is one thing that confuse me. Say we have 3
                replica, and 2 of them are OK and the left one is
                outdated due to temporary IO failure. For some reason,
                one of the 2 correct replica is truncated to 0 due to
                some underlying correction. Will glusterfs kick the 0
                size file out? or still consider it a correct one and
                may corrupt the left correct replica by healing?</div>
              <br>
            </div>
          </blockquote>
        </div>
      </div>
    </blockquote></div>
    Out of the two correct replicas, gluster will pick the first healthy
    replica brick as source [see afr_sh_select_source()]. If that brick
    is truncated at the back-end due to &#39;underlying correction&#39; (not
    sure what that means), then yes I&#39;m afraid it will still be
    considered as correct source and you would get zero byte file in
    other 2 bricks because of the healing.<div class=""><br>
    <blockquote type="cite">
      <div class="gmail_extra">
        <div class="gmail_quote">
          <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
            <div dir="ltr">
              <div style="font-family:arial,helvetica,sans-serif">In
                function afr_mark_sources(), it kicks 0 size file out
                when all nodes are innocent. Even when all nodes are
                fools, the file with largest size will be chosen as
                source. When it comes to the case that there is wise
                nodes, it won&#39;t further check file size. Considering
                different file size of replicate will trigger healing to
                work, I am wondering if there is any reason behind the
                code?</div>
            </div>
          </blockquote>
        </div>
      </div>
    </blockquote></div>
    The changelog extended attributes are marked  by AFR based on the
    result of whether the file operation succeeded or not on each of the
    replica. It uses those attributes to determine the source/sink.
    Direct modification of the file at the brick will invalidate any
    meaning that the changelog holds.<br>
    Thanks,<br>
    Ravi<div class=""><br>
    <blockquote type="cite">
      <div class="gmail_extra">
        <div class="gmail_quote">
          <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
            <div dir="ltr">
              <div style="font-family:arial,helvetica,sans-serif"><br>
              </div>
              <div style="font-family:arial,helvetica,sans-serif">Thanks.</div>
              <span><font color="#888888">
                  <div style="font-family:arial,helvetica,sans-serif">
                    <br>
                  </div>
                  <div>Zhang Huan</div>
                </font></span></div>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>_______________________________________________
Gluster-devel mailing list
<a href="mailto:Gluster-devel@nongnu.org" target="_blank">Gluster-devel@nongnu.org</a>
<a href="https://lists.nongnu.org/mailman/listinfo/gluster-devel" target="_blank">https://lists.nongnu.org/mailman/listinfo/gluster-devel</a>
</pre>
    </blockquote>
    <br>
  </div></div>

</blockquote></div><br></div></div>