thagale / google-refine

Automatically exported from code.google.com/p/google-refine
Other
0 stars 0 forks source link

Entire Refine workspace metadata trashed unrecoverably #528

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
All of the projects in my Refine workspace directory have been renamed from 
.project to .project.corrupted and each contains a 0-byte metadata.json file.

I'm not sure exactly how this happened, but I suspect that Refine tried to 
shutdown when it was in a low-memory situation and ended up writing the 
0-length files.  Although it uses a write, rename, delete strategy for updates, 
this only checks for the existence of the output file, not whether or not it 
contains valid data.

I think a few things need to be done differently:
- don't update project metadata which hasn't been modified
- don't delete the old metadata json file until the next time Refine has been 
started and successfully read in the newly written file (so that there's always 
a backup copy)
- probably other stuff after a little more code review

Original issue reported on code.google.com by tfmorris on 9 Feb 2012 at 1:43

GoogleCodeExporter commented 8 years ago
We've experienced the same thing! I'm also unsure what happened, but I think I 
had to force-quit Eclipse when running Refine through Eclipse. Like you said - 
all projects became corrupt - a bit of a scare!

Original comment by danpaulsmith on 14 Feb 2012 at 2:58

GoogleCodeExporter commented 8 years ago
Low frequency, but high impact bug, so bumping up the priority.

Original comment by tfmorris on 18 Sep 2012 at 6:52