Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-1963

Java API doesn't allow backup cursors

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: WT2.6.1
    • Fix Version/s: WT2.7.0
    • Labels:
      None
    • # Replies:
      3
    • Last comment by Customer:
      true

      Description

      Note: Originally submitted in github by grogers0: Greg Rogers, see: https://github.com/wiredtiger/wiredtiger/issues/2017

      The java cursor implementation for next() always calls get_value_wrap() if the underlying cursor next() returns successfully. The get_value_wrap() function throws an exception if the underlying cursor get_value() returns non-zero. Backup cursors only yield values, not keys: the get_value() function returns ENOTSUP, and thus will always throw an exception when you call the java next().

      Probably the easiest way to fix it is to check if the value format is empty, and if so don't try to retrieve a value.

        Activity

        Hide
        xgen-internal-githook Githook User added a comment -

        Author:

        {u'username': u'ddanderson', u'name': u'Don Anderson', u'email': u'dda@ddanderson.com'}

        Message: WT-1963. Refactored Java's next/prev/search/search_near, and modified
        so they do not get the key/value when there is no format.
        Branch: develop
        https://github.com/wiredtiger/wiredtiger/commit/e038dc447eab3234168a3f76911b6a25b4bf4992

        Show
        xgen-internal-githook Githook User added a comment - Author: {u'username': u'ddanderson', u'name': u'Don Anderson', u'email': u'dda@ddanderson.com'} Message: WT-1963 . Refactored Java's next/prev/search/search_near, and modified so they do not get the key/value when there is no format. Branch: develop https://github.com/wiredtiger/wiredtiger/commit/e038dc447eab3234168a3f76911b6a25b4bf4992
        Hide
        xgen-internal-githook Githook User added a comment -

        Author:

        {u'username': u'agorrod', u'name': u'Alex Gorrod', u'email': u'alexander.gorrod@mongodb.com'}

        Message: Merge pull request #2019 from wiredtiger/java-backup-cursor

        WT-1963. Modified Java's next/prev/search/search_near to work with backup cursors
        Branch: develop
        https://github.com/wiredtiger/wiredtiger/commit/58f9e990a22539ff95ace50ca2ae9d0e77a1f343

        Show
        xgen-internal-githook Githook User added a comment - Author: {u'username': u'agorrod', u'name': u'Alex Gorrod', u'email': u'alexander.gorrod@mongodb.com'} Message: Merge pull request #2019 from wiredtiger/java-backup-cursor WT-1963 . Modified Java's next/prev/search/search_near to work with backup cursors Branch: develop https://github.com/wiredtiger/wiredtiger/commit/58f9e990a22539ff95ace50ca2ae9d0e77a1f343
        Hide
        donald.anderson Donald Anderson added a comment -
        Show
        donald.anderson Donald Anderson added a comment - The merge of pull request https://github.com/wiredtiger/wiredtiger/commit/e038dc447eab3234168a3f76911b6a25b4bf4992 resolves the problem.

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Days since reply:
              1 year, 39 weeks ago
              Date of 1st Reply: