Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-14220

fdb_iterator_seek_to_max fails, with by-sequence iterator

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • feature-backlog
    • bug-backlog
    • forestdb
    • Security Level: Public
    • None
    • Untriaged
    • Unknown

    Description

      fdb_iterator_seek_to_max() returns FDB_RESULT_INVALID_ARGS if called on an iterator that was created via fdb_iterator_sequence_init(). This makes it impossible to iterate sequences in reverse order.

      (I thought of getting the database's last sequence and manually seeking to that value ... but there's no API to seek to a given sequence, i.e. no fdb_iterator_seek_seq() function.)

      Couchbase Lite needs to be able to iterate sequences in reverse order*. The only workaround I can think of is to iterate forwards, capture the results in an array, and then reverse the array; but this requires iterating over every document in the database and storing that many results in memory, which isn't practical.

      Attachments

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

        Activity

          People

            sundar Sundar Sridharan (Inactive)
            jens Jens Alfke
            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