Error when set security of database: no_ring
- Dominant language
- Erlang
- Stars
- 7k
- Forks
- 1.1k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 9
Description
[NOTE]: # ( ^^ Provide a general summary of the issue in the title above. ^^ )
## Description
When I use `curl` to set db security, the response is:
```
{"error":"error","reason":"no_ring"}
```
And the couchdb logs show that:
```
rpc couch_db:set_security/2 badarg
Failed to set security object on ... :: {error,badarg}
```
But other databases are ok.
The data size of the error db is about 1GB.
## Steps to Reproduce
[NOTE]: # ( Include commands to reproduce, if possible. curl is preferred. )
The command I used is just like
```
curl http://localhost:5984/db_name/_security -X PUT -H 'content-type: application/json' -H 'accept: application/json' -d '{"admins":{"names":["admin"],"roles":[]},"members":{"names": ["admin"],"roles": []}}'
```
## Your Environment
[TIP]: # ( Include as many relevant details about your environment as possible. )
[TIP]: # ( You can paste the output of curl http://YOUR-COUCHDB:5984/ here. )
* CouchDB version used: docker image with version 2.1.1
```
{"couchdb":"Welcome","version":"2.1.1","features":["scheduler"],"vendor":{"name":"The Apache Software Foundation"}}
```
Contributor guide
Research direction
Start by reproducing the PUT request to /db_name/_security against the reported large database and inspect the couch_db:set_security/2 failure in the logs. Trace the no_ring/badarg response from that endpoint and verify that setting the security object succeeds for the affected database without regressing other databases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- erlang
- Domain
- databases, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100