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

it's possible to create an LSM object that isn't backed by a row-store

    • Type: Icon: Task Task
    • Resolution: Done
    • WT1.3.1
    • Affects Version/s: None
    • Component/s: None

      Here's the script:

      import wiredtiger, wttest
       
      class test_f(wttest.WiredTigerTestCase):
          def test_ok(self):
              uri = 'table:x'
              self.session.create(uri, 'key_format=r,value_format=S')
              cursor = self.session.open_cursor(uri, None, "append")
              cursor.set_value("value")
              cursor.insert()
          
          def test_fail(self):
              uri = 'lsm:x'
              self.session.create(uri, 'key_format=r,value_format=S')
              cursor = self.session.open_cursor(uri, None, "append")
              cursor.set_value("value")
              cursor.insert()
      

      test_ok works, and test_fail doesn't work, which is all good.

      The problem is that test_fail doesn't fail until __clsm_insert realizes there's no key:

      (gdb) where
      #0  __clsm_insert (cursor=0x803348740) at ../src/lsm/lsm_cursor.c:722
      
      (gdb) n
      725		WT_LSM_ENTER(clsm, cursor, session, insert);
      (gdb) 
      726		WT_CURSOR_NEEDKEY(cursor);
      (gdb) 
      738	err:	WT_LSM_END(clsm, session);
      (gdb) 
      740		return (ret);
      

      Maybe I'm misunderstanding, but shouldn't we have failed in session.create?

            Assignee:
            michael.cahill@mongodb.com Michael Cahill (Inactive)
            Reporter:
            keith.bostic@mongodb.com Keith Bostic (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: