-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Configuration
-
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.
- is caused by
-
WT-12249 Opening a cursor may accidentally inherit config from a cached cursor
- Closed