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

return current value on WT_CURRENT::insert with (default) no-overwrite

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

      A semantic that came up in discussions about Riak: we could return the current value if we're failing a WT_CURSOR::insert call with key-exist.

      One risk: we'd be discarding the application-set value of the WT_CURSOR::insert call, replacing it with something else.

      This means loops like:

      ret = WT_CURSOR::insert()
      if (ret == WT_DUPLICATE_KEY) {
              ret = WT_CURSOR::get()
              /* muck about with the value */
              ret = WT_CURSOR::update()
      }
      

      would require one less engine call.

      Michael, I didn't want this one to get lost, kill it if you don't like it.

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

              Created:
              Updated:
              Resolved: