<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<div class="moz-cite-prefix">On 2014年09月18日 16:30, Bingpeng Zhu
wrote:<br>
</div>
<blockquote cite="mid:tencent_4ACF0BC52113D5A300F40F7A@qq.com"
type="cite">
<div>
<div style="line-height: 21px;"><span style="line-height: 1.5;">Thank
you for the advice.</span></div>
<div style="line-height: 21px;"><span style="line-height: 1.5;">default_init()
of sheep/store.c</span><span style="line-height: 1.5;">
has </span><span style="line-height: 1.5;">already </span><span
style="line-height: 1.5;">had the logic of unlinking </span><span
style="line-height: 1.5;">oid.tmp files. I'm not sure the
reason why oid.tmp file still exists </span><span
style="line-height: 1.5;">in the system.</span></div>
</div>
</blockquote>
No. current logic does not unlink oid.tmp files in default_init().<br>
<blockquote cite="mid:tencent_4ACF0BC52113D5A300F40F7A@qq.com"
type="cite">
<div><span style="line-height: 1.5;"><br>
</span></div>
<div>
<div><br>
</div>
<div><br>
</div>
<div style="font-size: 12px;font-family: Arial
Narrow;padding:2px 0 2px 0;">------------------ Original ------------------</div>
<div style="font-size: 12px;background:#efefef;padding:8px;">
<div><b>From: </b> "Hitoshi
Mitake";<a class="moz-txt-link-rfc2396E" href="mailto:mitake.hitoshi@lab.ntt.co.jp"><mitake.hitoshi@lab.ntt.co.jp></a>;</div>
<div><b>Date: </b> Sep 18, 2014</div>
<div><b>To: </b> "Ruoyu"<a class="moz-txt-link-rfc2396E" href="mailto:liangry@ucweb.com"><liangry@ucweb.com></a>; <wbr></div>
<div><b>Cc: </b> "Bingpeng Zhu"<a class="moz-txt-link-rfc2396E" href="mailto:nkuzbp@foxmail.com"><nkuzbp@foxmail.com></a>;
"sheepdog"<a class="moz-txt-link-rfc2396E" href="mailto:sheepdog@lists.wpkg.org"><sheepdog@lists.wpkg.org></a>; <wbr></div>
<div><b>Subject: </b> Re: [sheepdog] question about replica
recovery failure caused by oid.tmp file</div>
</div>
<div><br>
</div>
At Tue, 16 Sep 2014 10:10:32 +0800,<br>
Ruoyu wrote:<br>
> <br>
> [1 <multipart/alternative (7bit)>]<br>
> [1.1 <text/plain; ISO-8859-1 (7bit)>]<br>
> Thanks Bingpeng.<br>
> I also encountered this problem.<br>
> I suggest sheep should scan oid.tmp files and remove them
when it is <br>
> being started.<br>
<br>
I agree with Ruoyu's opinion. .tmp files should be deleted at<br>
initialization time. e.g. default_init() of sheep/store.c would
be a<br>
good place for it.<br>
<br>
Thanks,<br>
Hitoshi<br>
<br>
> <br>
> On 2014?09?15? 00:14, Bingpeng Zhu wrote:<br>
> > Hi, all:<br>
> > I have a problem in using sheepdog. I create a
erasure coded VDI <br>
> > and write<br>
> > some data to it. Then, I unplug disk and
stop/restart one sheep in a <br>
> > short<br>
> > time. After recovery is completed in the latest
epoch, I find some <br>
> > replica is<br>
> > lost and only the corresponding oid.tmp file exists
in the data <br>
> > directory. I tried<br>
> > to rebuild the replica using "dog vdi check", but it
didn't work. I <br>
> > think it is<br>
> > caused by oid.tmp file. I have to delete the oid.tmp
file manually <br>
> > and then<br>
> > "dog vdi check" successfully recoverd the lost
replica.<br>
> > In function default_create_and_write() of
sheep/plain_store.c, <br>
> > it returns<br>
> > success directly if oid.tmp file exists. I have read
the comment in <br>
> > this function carefully,<br>
> > it says gateway and recovery thread may try to write
the SAME data, <br>
> > so it is okay<br>
> > to simply return success here. To solve this
problem, I want to <br>
> > change the code of<br>
> > default_create_and_write() so that replica data will
be written even <br>
> > oid.tmp file exists.<br>
> > If oid.tmp exists, the function should overwrite it.<br>
> > I am not sure if this change will work good for all
scenario. <br>
> > Especially, I doubt whether<br>
> > this change will lead to old data overwriting new
data. But I <br>
> > haven't thought out any scenario<br>
> > that will lead to old data overwriting new data. Can
someone give me <br>
> > some advice to solve this problem?<br>
> ><br>
> ><br>
> ><br>
> <br>
> [1.2 <text/html; ISO-8859-1 (7bit)>]<br>
> <br>
> [2 <text/plain; us-ascii (7bit)>]<br>
> -- <br>
> sheepdog mailing list<br>
> <a class="moz-txt-link-abbreviated" href="mailto:sheepdog@lists.wpkg.org">sheepdog@lists.wpkg.org</a><br>
> <a class="moz-txt-link-freetext" href="http://lists.wpkg.org/mailman/listinfo/sheepdog">http://lists.wpkg.org/mailman/listinfo/sheepdog</a><br>
</div>
</blockquote>
<br>
</body>
</html>