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

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

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.1.2
    • Fix Version/s: 1.1.6
    • Component/s: Core
    • Security Level: Public
    • Labels:
      None
    • Sprint:
      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.

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

        Activity

        There are no open Gerrit changes for this issue.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Agile

                Gerrit Reviews

                There are no open Gerrit changes