<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 02/26/2014 07:42 PM, Zhang Huan
wrote:<br>
</div>
<blockquote
cite="mid:CAM8aEsGqqwaYre4SOPi7AObzF2CcYMr6eYFqMjERD2-r6o_7Yw@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_default"
style="font-family:arial,helvetica,sans-serif">Hello guys,</div>
<div class="gmail_default"
style="font-family:arial,helvetica,sans-serif"><br>
</div>
<div class="gmail_default"
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"><<a moz-do-not-send="true"
href="mailto:zhhuan@gmail.com" target="_blank">zhhuan@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div class="gmail_default"
style="font-family:arial,helvetica,sans-serif">Hello
all,</div>
<div class="gmail_default"
style="font-family:arial,helvetica,sans-serif"><br>
</div>
<div class="gmail_default"
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>
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 'underlying correction' (not
sure what that means), then yes I'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.<br>
<blockquote
cite="mid:CAM8aEsGqqwaYre4SOPi7AObzF2CcYMr6eYFqMjERD2-r6o_7Yw@mail.gmail.com"
type="cite">
<div class="gmail_extra">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div class="gmail_default"
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'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>
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<br>
<blockquote
cite="mid:CAM8aEsGqqwaYre4SOPi7AObzF2CcYMr6eYFqMjERD2-r6o_7Yw@mail.gmail.com"
type="cite">
<div class="gmail_extra">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div class="gmail_default"
style="font-family:arial,helvetica,sans-serif"><br>
</div>
<div class="gmail_default"
style="font-family:arial,helvetica,sans-serif">Thanks.</div>
<span class="HOEnZb"><font color="#888888">
<div class="gmail_default"
style="font-family:arial,helvetica,sans-serif">
<br>
</div>
<div>Zhang Huan</div>
</font></span></div>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Gluster-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Gluster-devel@nongnu.org">Gluster-devel@nongnu.org</a>
<a class="moz-txt-link-freetext" href="https://lists.nongnu.org/mailman/listinfo/gluster-devel">https://lists.nongnu.org/mailman/listinfo/gluster-devel</a>
</pre>
</blockquote>
<br>
</body>
</html>