rnewson commented on issue #5129: URL: https://github.com/apache/couchdb/issues/5129#issuecomment-2225186959
CouchDB is built as a "crash only" system, meaning that the couchdb process is always ready to be killed, there's no shutdown code, no need to call `sync` manually, etc. When a document is written, and the 200 OK returned, CouchDB has already done everything it can to persist the data to disk (including `fsync()` calls). At startup CouchDB will read from the end of each file looking for the latest valid header. Without knowing how the files were corrupted it is hard to know what to recommend and, unfortunately, there are no tools we publish to repair a corrupted `.couch` file. At best we might be able to build an erlang script that would attempt to extract the document bodies inside the .couch files, though that would be shorn of a number of details (the doc id being the most significant as it is stored in a different location to the body, the corrupted btree index would be able to find it). Have you perhaps replicated this database elsewhere recently? that could be another source of backup. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
