<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 22, 2015 at 12:24 PM, Changbin Liu <span dir="ltr"><<a href="mailto:changbin.liu@gmail.com" target="_blank">changbin.liu@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><br></div><div>But now I wonder: is it "by design" that EC does not handle an accidental deletion of just the data file? </div></div></blockquote><div><br></div><div>Well, the design goal was not "do not handle the accidental deletion of just the data file" - it was "make replication fast enough that it works" - and that required not listing all the dirs all the time.</div><div>  </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Deleting both data file and hashes.pkl file is more like a deliberately-created failure case instead of a normal one.  </div></div></blockquote><div><br></div><div>To me deleting some file that swift wrote to disk without updating (or removing) the index it normally updates during write/delete/replicate to accelerate replication seems like a deliberately created failure case?  You could try to flip a bit or truncate a data file and let the auditor pick it up.  Or rm a suffix and wait for the every-so-often suffixdir listdir to catch it, or remove an entire partition, or wipe a new filesystem onto the disk.  Or shutdown a node and do a PUT, then shutdown the handoff node, and run the reconstructor.  Any of the "normal" failure conditions like that (and plenty more!) are all detected by and handled efficiently.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>To me Swift EC repairing seems different from the triple-replication mode, where you delete any data file copy, it will be restored. </div><div> </div></div></blockquote><div><br></div><div>Well, replication and reconstruction are different in lots of ways - but not this part.  If you rm a .data file without updating the index you'll need some activity (post/copy/put/quarantine) in the suffix before the replication engine can notice.</div><div><br></div><div>Luckily (?) people don't often go under the covers into the middle of the storage system and rm data like that?</div><div><br></div><div>-Clay</div></div></div></div>