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

WT_CURSOR.random and invisible updates

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: WT2.2.1
    • Component/s: None
    • Labels:

      Description

      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()
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                keith.bostic Keith Bostic
                Reporter:
                keith.bostic Keith Bostic
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: