Details
-
Bug
-
Resolution: Fixed
-
Critical
-
3.1.0
-
Security Level: Public
-
None
-
CBG Sprint 136
-
1
Description
Trying to update a database to specify an explicit _default scope instead of an implicit one triggers the handling intended for disallowing changing scopes on a database.
This is obviously incorrect, as it prevents being able to move from a non-collection aware database to one that contains a named collection inside the _default scope.
$ curl http://Administrator:password@localhost:4985/db1/_config
|
{"bucket":"b1","name":"db1","cache":{"rev_cache":{}},"offline":false,"num_index_replicas":0}
|
$ curl -X POST http://Administrator:password@localhost:4985/db1/_config -H 'Content-Type: application/json' -d '{"scopes":{"_default":{"collections":{"_default":{}}}}}'
|
{"error":"Bad Request","reason":"1 errors:\ncannot change scopes after database creation"}
|
Workaround until fix: Delete and recreate the database with an explicit `_default` scope:
$ curl -X DELETE http://Administrator:password@localhost:4985/db1/
|
{}
|
$ curl -X PUT http://Administrator:password@localhost:4985/db1/ -H 'Content-Type: application/json' -d '{"bucket":"b1","num_index_replicas":0,"scopes":{"_default":{"collections":{"_default":{}}}}}'
|
Attachments
Issue Links
- Clones
-
CBG-3196 Cannot update db config from implicit `_default` scope to explicit `_default` scope
- Closed