wiredtiger/wiredtiger — pull request #512 by michaelcahill (2013-06-18 07:28:50+00:00)
Title: LSM code checking WT_CURSTD_OVERWRITE

Alex, I didn't want to forget this one, so I'm opening an issue.

I'm confused why __clsm_update and __clsm_remove check the cursor's WT_CURSTD_OVERWRITE flag.

The code in each that does:

```
if (F_ISSET(cursor, WT_CURSTD_OVERWRITE) ||
(ret = __clsm_search(cursor)) == 0)
```
should maybe be:
```
if ((ret = __clsm_search(cursor)) == 0)
```

but that's bad for __clsm_remove, because LSM searches are more expensive.

Is there a reason we can't change the semantics of WT_CURSOR::remove to ignore the possibility the key doesn't exist, and then LSM doesn't have to do a search first.

If that isn't OK, we could at least make that the default and add a new config option to return failure if the key doesn't exist?

This isn't an issue for the Basho/Riak tests, I'm told all of its get/put/del cursors are setting overwrite.