Comment 4 for bug 1260132

Revision history for this message
gholt (gholt) wrote :

A system could get into that state just due to file system corruption (power fault, bit error, who knows?).

I don't think writing a .ts before deleting stuff and then deleting the .ts or whatever is truly the solution. You can still end up with corruption that leaves you with just a .meta, especially with all the alternate file systems folks are wanting to use. Best to handle the situation.

Quarantining seems the right thing to do, in my opinion. If this node is the only one with the .meta then yes there is a risk that the .meta was good and that the node just lost the .data. But that would mean one node lost the .data and the other nodes lost the .meta which seems pretty unlikely. More likely would be that the node with just the .meta brought it back to life due to some corruption and that it shouldn't be there. But, I guess the point is, the state is not knowable so quarantine makes sense (to me).

The hash_cleanup_listdir should not ever leave such a state since it deletes superseded files only, or a .ts that stands alone and is older than the reclaim age. But again, with file system corruption, anything is possible, including directories where there should be files, bizzare names, perfect names in seemingly weird orders, etc.