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

Paginator object doesn't move onto next "page" correctly

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Blocker
    • 1.1.6
    • 1.1.2
    • Core
    • Security Level: Public
    • None
    • Sprint 1 - CW 19 & 20

    Description

      Customer found his own issue:
      I had a look at the source code for the java driver and found the error there. It is in:

      com.couchbase.client.protocol.views.Paginator.getNextPage()

      Right after calculating the number of "remaining" keys, it sets the limit of the query to the remaining number of keys and re-runs the query. What is missing here is:

      q.setSkip(totalDocs);

      To actually start from the entry after the last entry on the current page. I have tried this and it works. But there is more code in this method and it is not very easy to follow so important to make sure that this fits.

      I am enclosing a diff.

      Attachments

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

        Activity

          People

            daschl Michael Nitschinger
            perry Perry Krug
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty