disagg: Fix layered search_near() incorrectly resetting the cursor

XMLWordPrintableJSON

    • Storage Engines - Foundations
    • None
    • None

      When running test_prepare03.py under the disagg hook, we fail with EINVAL on the second attempt of search_near(). This is because we reset/unposition the cursor after the initial search_near() attempt fails, but this is unexpected behaviour since it failed during the initial CURSOR_API_CALL setup, before we actually start searching.

      We want to correct the __clayered_search_near() function so that the cursor is only reset if an error occurs during the search.

      Repro:

      $ python3 ../test/suite/run.py test_prepare03.py -p -v 4 --hook disagg -s 3
      [pid:27568]: Traceback (most recent call last):
        File "/home/ubuntu/wiredtiger/test/suite/wttest.py", line 161, in wrapper
          return func(self, *args, **kwargs)
        File "/home/ubuntu/wiredtiger/test/suite/wttest.py", line 309, in _callTestMethod
          method()
        File "/home/ubuntu/wiredtiger/test/suite/test_prepare03.py", line 195, in test_prepare_cursor
          cursor.search_near()
        File "/home/ubuntu/wiredtiger/build/lang/python/wiredtiger/swig_wiredtiger.py", line 215, in search_near
          return self._search_near(*args)
      _wiredtiger.WiredTigerError: Invalid argument 

       

       

            Assignee:
            [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            Alexander Pullen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: