Details
-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
None
-
Untriaged
-
Unknown
Description
Create a Scope
curl -u Administrator:password -i -X POST http://10.112.176.101:8091//pools/default/buckets/default/collections -d name=Scope0
Create a collection
curl -u Administrator:password -i -X POST http://10.112.176.101:8091//pools/default/buckets/default/collections/Scope0 -d name=Collections0
Delete default collection
curl -u Administrator:password -i -X DELETE http://10.112.176.101:8091//pools/default/buckets/default/collections/_default/_default
Create a memcached client and do get_collection(True), update_collection_map fails with "KeyError" when default collection is deleted
Execute the attached script
python cbsetcollections.py -u Administrator -p password -n 10.112.176.101:11210 -b default
collections enabled
the response is {}
Traceback (most recent call last):
File "cbsetcollections.py", line 61, in <module>
sys.exit(main(sys.argv[1:]))
File "cbsetcollections.py", line 48, in main
rv=conn.get_collections(True)
File "/Users/anithakuberan/Documents/testlib/collections/lib/mc_bin_client.py", line 614, in get_collections
self._update_collection_map(rv[2])
File "/Users/anithakuberan/Documents/testlib/collections/lib/mc_bin_client.py", line 665, in _update_collection_map
for collection in scope['collections']:
KeyError: 'collections'
Got mc_bin_client.py file from https://github.com/couchbase/kv_engine/blob/master/engines/ep/management/mc_bin_client.py