[sheepdog] Fixing method for data wipe bug in the recovery

张扬 3100100878 at zju.edu.cn
Sat Nov 29 10:44:31 CET 2014


Hi,


We recently encounter the bug which was reported here:
https://bugs.launchpad.net/sheepdog-project/+bug/1327037


I'm not sure if this is the root cause, but by changing the initial value of ret in function recover_object_from_replica(in recovery.c)
ret = SD_RES_SUCCESS 
to 
ret = SD_RES_NO_OBJ (actually anything but SD_RES_SUCCESS), i'm able to avoid the lose of data.


The reason is that, when the node try to recover it self to match the newest epoch, the nr_copies in function recover_object_from_replica is zero, so it return ret == SD_RES_SUCCESS while it actually skipped all the recover function in the loop. I don't know why nr_copies is zero though.


Thanks,
Yang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wpkg.org/pipermail/sheepdog/attachments/20141129/4b621b63/attachment-0003.html>


More information about the sheepdog mailing list