On Oct 25, 2011, at 11:16 PM, Mark Hahn wrote: >> Isn't couchdb crash-proof due to append-only writing? > > Does anyone know for sure about this? I have used append-only files for > many years and have never seen any corruption. I would assume writes happen > in sequence. If the trailer is missing then it would just stop at the > penultimate trailer.
I've seen multiple cases of data corruption when the fsync barrier prior to writing the "trailer" is omitted. By default CouchDB issues this barrier for database commits but not for commits of derived view index headers. Best, Adam
