The WT_CURSOR.random method can return an insert object from a page without on-page entries, and immediately calls __wt_kv_return; if the update record for the insert object is invisible to the session, we'll drop core because we expect to reference a valid page object any time we don't have a WT_INSERT/WT_UPDATE pair.
Here's the script:
from helper import key_populate, value_populate import wiredtiger, wttest # test_xxx.py class test_xxx(wttest.WiredTigerTestCase): def test_next_random_invisible(self): uri = 'table:xxx' self.session.begin_transaction() self.session.create(uri, 'key_format=S,value_format=S') cursor = self.session.open_cursor(uri, None) for i in range(1, 100): cursor.set_key(key_populate(cursor, i)) cursor.set_value(value_populate(cursor, i)) cursor.insert() s = self.conn.open_session() cursor = s.open_cursor(uri, None, "next_random=true") cursor.next() if __name__ == '__main__': wttest.run()
- related to
-
WT-1071 Invisible update changes.
- Closed