wanted support of {error,enospc}
- Dominant language
- Erlang
- Stars
- 7k
- Forks
- 1.1k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 9
Description
## Summary
I use dedicated volume for CouchDB. Our application time to tie start make lot of changes and database size gow very fast.
I can see this errors in couchdb log
```
[error] 2021-05-24T12:52:20.836423Z couchdb@db-us-west-2-1.nga911.com <0.14081.36> -------- CRASH REPORT Process (<0.14081.36>) with 0 neighbors crashed with reason: no match of right hand value {error,enospc} at couch_btree:'-write_node/3-lc$^0/1-0-'/5(line:443) <= couch_btree:write_node/3(line:441) <= couch_btree:modify_node/4(line:409) <= couch_btree:modify_kpnode/6(line:521) <= couch_btree:modify_node/4(line:393) <= couch_btree:query_modify/4(line:259) <= couch_btree:add_remove/3(line:237) <= couch_bt_engine:write_doc_infos/3(line:423); initial_call: {couch_db_updater,init,['Argument__1']}, ancestors: [<0.31318.34>], message_queue_len: 0, messages: [], links: [<0.229.0>], dictionary: [{idle_limit,61000},{io_priority,{db_update,<<"shards/00000000-1fffffff...">>}}], trap_exit: false, status: running, heap_size: 10958, stack_size: 27, reductions: 4113
[error] 2021-05-24T12:52:20.836555Z couchdb@db-us-west-2-1.nga911.com emulator -------- Error in process <0.14137.36> on node 'couchdb@db-us-west-2-1.nga911.com' with exit value:
{{badmatch,{'EXIT',normal}},[{couch_file,pread_binary,2,[{file,"src/couch_file.erl"},{line,169}]},{couch_file,pread_term,2,[{file,"src/couch_file.erl"},{line,157}]},{couch_btree,get_node,2,[{file,"src/couch_btree.erl"},{line,434}]},{couch_btree,lookup,3,[{file,"src/couch_btree.erl"},{line,284}]},{couch_btree,lookup,2,[{file,"src/couch_btree.erl"},{line,274}]},{couch_bt_engine,open_docs,2,[{file,"src/couch_bt_engine.erl"},{line,327}]},{couch_db,before_docs_update,3,[{file,"src/couch_db.erl"},{line,1340}]},{couch_db,update_docs,4,[{file,"src/couch_db.erl"},{line,1169}]}]}
```
## Desired Behaviour
added support of this error and generate relevant log message.
## Additional context
I use CouchDB 2.3.1
Contributor guide
Research direction
Start by tracing the {error,enospc} failure through src/couch_file.erl and the couch_btree:write_node/3 and couch_btree:get_node/2 entry points shown in the crash logs. Determine how this error should be handled and logged; done means the failure no longer produces the reported unmatched-value crash and emits the relevant log message.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- erlang
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100