Uploaded image for project: 'Couchbase Python Client Library'
  1. Couchbase Python Client Library
  2. PYCBC-470

Application is unable to run queries unless the cluster has a query node in at bootstrap time

    XMLWordPrintable

Details

    • Bug
    • Resolution: User Error
    • Minor
    • None
    • 2.3.4
    • library
    • None
    • LCB 2.8.5

    Description

      Feel free to assign to Libcouchbase if it's deemed a libcouchbase bug, opened as a PYCBC as I have a simple script demonstrating the issue with Python.

      Essentially the issue is that an application which runs queries will never be able to work correctly if there is not at least one query node in the cluster at the time of bootstrap.

      Reproduction
      Test Script

      from couchbase.n1ql import N1QLQuery
      import time
      from couchbase.bucket import Bucket
      bkt = Bucket('couchbase://10.142.171.102/test', password='password')
      q = N1QLQuery('SELECT 1+1')
      while True:
          try:
              for row in bkt.n1ql_query(q):
                  print row
          except Exception as e:
              print e
          time.sleep(1)
      

      1. Create a single node cluster with just data
      2. Add a bucket (and user with access to the bucket)
      3. Start the script, observe the errors
      4. Add a new node in with the query service
      5. Observe that the errors do not go away, the application still believes that it is unable to run the query despite the fact there's now a query node
      6. Restarting the application fixes the issue as the SDK is now able to use the new query node

      I know that this seems a bit contrived, but this exact issue was hit when creating https://github.com/couchbaselabs/connect-eu-demo, we wanted to demonstrate new capabilities being enabled as new services came into the cluster. In order to workaround the issue we had to start with 1 query node in the cluster, which seems a bit strange and messy.

      Attachments

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

        Activity

          People

            matt.carabine Matt Carabine (Inactive)
            matt.carabine Matt Carabine (Inactive)
            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