Uploaded image for project: 'Couchbase Java Client'
  1. Couchbase Java Client
  2. JCBC-440

Inconsistent result of paginated query.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • Major
    • None
    • 1.3.2
    • Core, Views
    • Security Level: Public
    • None
    • Red Hat Enterprise Linux Server release 6.3 (Santiago)
      Java 7
      Couchbase Server Community Edition 2.2.0

    Description

      I get a strange behavior with paginated query. While I paginate on the result set, I get duplicates of some documents. I'm doing the following in my code:

      // force start indexing of view
      query.setStale(Stale.FALSE);
      query.setReduce(true);
      ViewResponse respFromReduce = client.query(view, query);
      String expectedCountFromScroll = null;
      for (ViewRow viewRow : respFromReduce)

      { expectedCountFromScroll = viewRow.getValue(); }


      query.setReduce(false);
      query.setIncludeDocs(false);
      //disable indexing of view from sdk
      query.setStale(Stale.OK);
      Paginator scroll = client.paginatedQuery(view, query, SCROLL_SIZE);
      int docsFromScrollCnt = 0;
      while (scroll.hasNext())

      { ViewResponse response = scroll.next(); docsFromScrollCnt += response.size(); }

      And I see, that docsFromScrollCnt > expectedCountFromScroll.
      I think, that while query Couchbase auto-indexing view, so I decide to disable auto-indexing by set viewUpdateDeamon's parameters. I set updateInterval to value, that greater then querying time, updateMinChanges and replicaUpdateMinChanges to zero.

      It's not helped, but I noticed following interesting feature. Count of duplicate documents always equals n*SCROLL_SIZE.

      How can I avoid duplicate of document from paginated query?

      Attachments

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

        Activity

          People

            daschl Michael Nitschinger
            vakoroteev Vladislav Koroteev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty