From WT-98:
One of the issues raised in this change is the two modes of WT_CURSOR.remove, specified by the "overwrite" configuration:
- If the cursor was configured with "overwrite=true" (the default), the key must be set; the key's record will be removed if it exists, no error will be returned if the record does not exist.
- If the cursor was not configured with "overwrite=true", the key must be set and the key's record must exist; the record will be removed.
We additionally document that:
- On success, the cursor ends positioned at the removed record; to minimize cursor resources, the WT_CURSOR::reset method should be called as soon as the cursor no longer needs that position.
- If configured with overwrite=true and the record doesn't exist, we obviously cannot end positioned to the removed record, and the user cannot detect it.
After discussion, we're going to change WT_CURSOR.remove to return positioned if it starts positioned, else it will behave like WT_CURSOR.insert, and will return with no position and no key/value.