Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-31973

get_collection(True) through memcached client fails when default collection is deleted

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • 6.5.0
    • None
    • couchbase-bucket
    • None

    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

       

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            jwalker Jim Walker
            anitha.kuberan Anitha Kuberan
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty