Handle read-only remounts (erofs) disk errors better
- Dominant language
- Erlang
- Stars
- 7k
- Forks
- 1.1k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 9
Description
On Linux when disks / filesystems fail they can be remounted as read-only. Disk writes through Erlang's file IO in that case returns an `{errors, erofs}` error. CouchDB doesn't handle a worker returning that error well, and returns 500 responses even if there is a quorum of other workers which are able to satisfy the request.
In cases when quorum logic applies, we should be able to tolerate a worker returning `{erorr, erofs}` and perhaps treat it as a `rexi_EXIT maintenance_mode` error.
A few places to handle it:
https://github.com/apache/couchdb/blob/main/src/fabric/src/fabric_doc_update.erl#L61-L114
https://github.com/apache/couchdb/blob/main/src/fabric/src/fabric_rpc.erl#L155
Contributor guide
Research direction
Start with the quorum-handling paths in src/fabric/src/fabric_doc_update.erl (lines 61-114) and src/fabric/src/fabric_rpc.erl (around line 155), then trace how worker errors are classified. Confirm the expected behavior for Erlang read-only filesystem errors and ensure quorum requests tolerate them when other workers can satisfy the request instead of returning HTTP 500.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- erlang
- Domain
- backend, databases, distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100