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

Streaming on view crashes python.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 1.2.1
    • 1.2.0
    • None
    • Security Level: Public
    • Python v3.3.3 on OS X 10.8.5

    Description

      The following query:

      def query_by_timestamp(timestamp: int) -> Query:

      q = Query()

      q.stale = STALE_UPDATE_BEFORE
      q.startkey = timestamp
      q.endkey = int(timestamp + QUERY_PERIOD)
      q.inclusive_end = False

      return q

        1. query_by_timestamp()

      being called by:

      def by_timestamp(cb: Connection, timestamp: int) -> View:

      q = query_by_timestamp(timestamp)

      q.reduce = False

      view = cb.query("sensitive", "by_timestamp", include_docs=True, query=q, streaming=1)

      return view

        1. by_timestamp()

      The timestamp is a traditional Unix timestamp, i.e. it is a number key and not a string key. When `streaming` is set to `0` and not `1`, the query operates properly by returning the expected documents. (I pass `0` and `1` instead of True or False because the documentation says it is a bool and not a boolean.)

      Anon,
      Andrew

      Attachments

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

        Activity

          People

            mnunberg Mark Nunberg (Inactive)
            adonoho adonoho
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty