Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.0
    • Fix Version/s: 1.2.1
    • Component/s: None
    • Security Level: Public
    • Labels:
    • Environment:
      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

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

        Activity

        Hide
        adonoho adonoho added a comment -

        Any progress on fixing streaming?

        Anon,
        Andrew

        Show
        adonoho adonoho added a comment - Any progress on fixing streaming? Anon, Andrew
        Hide
        mnunberg Mark Nunberg added a comment -

        I was about to mark this as a duplicate some weeks ago when I fixed a related issue.

        See if this fixes your issue (the fix is merged into current master): https://www.couchbase.com/issues/browse/PYCBC-236

        Show
        mnunberg Mark Nunberg added a comment - I was about to mark this as a duplicate some weeks ago when I fixed a related issue. See if this fixes your issue (the fix is merged into current master): https://www.couchbase.com/issues/browse/PYCBC-236
        Hide
        mnunberg Mark Nunberg added a comment -

        Considering you are using include_docs with streaming, that may have been your issue, too (should be fixed by the ticket referenced above).

        Show
        mnunberg Mark Nunberg added a comment - Considering you are using include_docs with streaming, that may have been your issue, too (should be fixed by the ticket referenced above).
        Hide
        adonoho adonoho added a comment -

        Mark,

        Forgive my noobitude, where do I find this patch? Is it on Github or on a CB repo somewhere?

        Andrew

        Show
        adonoho adonoho added a comment - Mark, Forgive my noobitude, where do I find this patch? Is it on Github or on a CB repo somewhere? Andrew
        Hide
        mnunberg Mark Nunberg added a comment -

        https://github.com/couchbase/couchbase-python-client

        – there is no special step required if you're familiar with building from a python package source.

        However if you're not:

        (1) checkout the repository
        (2) cd into the repository
        (3) pip install .
        OR
        (3) python setup.py install

        Let me know if you have issues with this

        Mark

        Show
        mnunberg Mark Nunberg added a comment - https://github.com/couchbase/couchbase-python-client – there is no special step required if you're familiar with building from a python package source. However if you're not: (1) checkout the repository (2) cd into the repository (3) pip install . OR (3) python setup.py install Let me know if you have issues with this Mark
        Hide
        mnunberg Mark Nunberg added a comment -

        I believe this has been fixed

        Show
        mnunberg Mark Nunberg added a comment - I believe this has been fixed

          People

          • Assignee:
            mnunberg Mark Nunberg
            Reporter:
            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