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

Config compilation API returns invalid default value for a string based configuration

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Config Parsing
    • Labels:
      None
    • Storage Engines

      Found this while implementing the changes for WT-12298, when we call: cursor->bound("action=set") intentionally leaving out the bound API string. It actually returns "lower" as the choice for "bound". This is a bug as it should return NULL, or NOTSET or something along those lines. The user should get an error thrown saying they left out a configuration string.

      A valid call to cursor bound looks like this: cursor->bound("action=set,bound=lower"). To reproduce:

      1. Checkout lukes-bounded-cursor-compile-branch
      2. Run python ../test/suite/run.py cursor_bound01
      3. It will fail with:
       ubuntu@ip-10-0-1-170:~/wiredtiger/dist$ python ../test/suite/run.py cursor_bound01
      [pid:3582374]: ERROR in test_cursor_bound01.test_cursor_bound01.test_bound_api -s 0 (table.string)
      F
      ======================================================================
      FAIL: test_cursor_bound01.test_cursor_bound01.test_bound_api -s 0 (table.string)
      ----------------------------------------------------------------------
      Traceback (most recent call last):
        File "/home/ubuntu/wiredtiger/test/suite/wttest.py", line 233, in _callTestMethod
          method()
        File "/home/ubuntu/wiredtiger/test/suite/test_cursor_bound01.py", line 129, in test_bound_api
          self.assertRaisesWithMessage(wiredtiger.WiredTigerError, lambda: cursor.bound("action=set"),
        File "/home/ubuntu/wiredtiger/test/suite/wttest.py", line 656, in assertRaisesWithMessage
          self.assertRaises(exceptionType, expr)
      AssertionError: WiredTigerError not raised by <lambda>----------------------------------------------------------------------
      Ran 1 test in 0.764

      donald.anderson@mongodb.com and I discussed on a call and it appears the compilation code chooses the wrong thing for "bound".

            Assignee:
            donald.anderson@mongodb.com Donald Anderson
            Reporter:
            luke.pearson@mongodb.com Luke Pearson
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: