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

Allow for more accurate parsing of cursor overwrite=false config

    • Storage Engines
    • 3
    • 2024-06-11 - Dinosaurs go rawr, 2024-06-25 - Climbing BTrees

      For test case open_cursor(uri, "overwrite=false,") - note the trailing comma, I think the current logic sets overwrite to true, not false.  "overwrite=false" must appear verbatim to work correctly.

      MongoDB does have a couple cases that have "overwrite=false" with other config, but the other configs are checkpoint=WiredTigerCheckpoint or "read_once=true", which I think both indicate readonly cursors.  However other applications may well be affected.

      The following mod to a test case illustrates:

      diff --git a/test/suite/test_overwrite.py b/test/suite/test_overwrite.py
      index f8979966f..ebf7e9b2f 100644
      --- a/test/suite/test_overwrite.py
      +++ b/test/suite/test_overwrite.py
      @@ -62,7 +62,7 @@ class test_overwrite(wttest.WiredTigerTestCase):
               ds.populate()
       
               # Insert of an existing record with overwrite off fails.
      -        cursor = ds.open_cursor(uri, None, "overwrite=false")
      +        cursor = ds.open_cursor(uri, None, "overwrite=false,")
               cursor.set_key(ds.key(5))
               cursor.set_value(ds.value(1000))
               self.assertRaises(wiredtiger.WiredTigerError, lambda: cursor.insert()) 

      This gives errors.

            Assignee:
            monica.ng@mongodb.com Monica Ng
            Reporter:
            donald.anderson@mongodb.com Donald Anderson
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: