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

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

    XMLWordPrintable

    Details

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

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              michael.cahill Michael Cahill
              Reporter:
              keith.bostic Keith Bostic
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: