Hi Jan,

Yes, it is possible my database file is corrupted. My assumption at this point is that it is corrupted. I have made a copy of the database for investigation then deleted the original, recreated and repopulated it, after which all is back to normal for the customer.

I would like to know what exactly is wrong with the misbehaving copy and, if possible, how it came to be corrupted, how to avoid this happening in the future and recovery options if/when it does happen again. To this end, I am now learning a bit about Erlang (I have no previous experience) and reviewing the CouchDB code. I expect this will require considerable time and effort. Already the error message seems a little less obscure but I obviously have a long way to go before I can really understand what it is telling me. Any pointers to resources to support this learning would be appreciated.

Regards,
Ian

On 8/01/2017 07:19, Jan Lehnardt wrote:
Hi Ian,

is it possible your database file is corrupted?

Best
Jan
--

On 30 Dec 2016, at 18:47, Ian Goodacre <[email protected]> wrote:

I have a database for which compaction is failing. When I run compaction, I get 
errors in the CouchDB log like:

[Thu, 29 Dec 2016 16:13:43 GMT] [error] [emulator] Error in process <0.23370.44> with exit value: {function_clause,[{couch_db_updater,'-copy_docs/4-fun-3-',[not_found,{db,nil,<0.23370.44>,nil,<<16 
bytes>>,<0.23374.44>,<0.23372.44>,<0.23376.44>,{db_header,6,0,0,nil,nil,nil,1024,79,nil,1000},0,{btree,<0.23372.44>,nil,#Fun<couch_db_updater.10.55895019>,#Fun<couch_db_updater.11.100913286>,#Fun<couch_btree.5.296538>,#Fun<couch_db_updater.12.39068440>,snappy},{btree,<0.23372.44>,nil,#Fun<couch_db_updater.13.114276184>,#Fun<couch_db_updater.14.2340873>,#Fun<couch_btree.5.296538>,#Fun<couch_db_updater.15.23651859>,snappy},{btree,<0.23372.44>,nil,#Fun<couch_btree.3.127739064>,#Fun<couch_btree.4.112272954>,#Fun<couch_btree.5.296538>,nil,snappy},0,<<13
 bytes>>,"/var/co...

[Thu, 29 Dec 2016 16:13:43 GMT] [error] [<0.315.0>] ** Generic server <0.315.0> 
terminating
** Last message in was {'EXIT',<0.23370.44>,
                        {function_clause,
                         [{couch_db_updater,'-copy_docs/4-fun-3-',
                           [not_found,
{db,nil,<0.23370.44>,nil,<<"1483028022969955">>,
<0.23374.44>,<0.23372.44>,<0.23376.44>,
{db_header,6,0,0,nil,nil,nil,1024,79,nil,1000},
                             0,
                             {btree,<0.23372.44>,nil,
#Fun<couch_db_updater.10.55895019>,
#Fun<couch_db_updater.11.100913286>,
                              #Fun<couch_btree.5.296538>,
#Fun<couch_db_updater.12.39068440>,snappy},
                             {btree,<0.23372.44>,nil,
#Fun<couch_db_updater.13.114276184>,
#Fun<couch_db_updater.14.2340873>,
                              #Fun<couch_btree.5.296538>,
#Fun<couch_db_updater.15.23651859>,snappy},
                             {btree,<0.23372.44>,nil,
                              #Fun<couch_btree.3.127739064>,
...


Lots of information here but I don't understand it and I haven't found a 
description in the documentation.

What is the best way to learn about the structure and content of these log 
messages? Is there some documentation somewhere?



Reply via email to