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

WT_CURSOR.remove cannot always retain its position.

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • WT2.9.2, 3.2.13, 3.4.4, 3.5.6
    • Affects Version/s: None
    • Component/s: None
    • None
    • Storage 2017-03-27

      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.

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

              Created:
              Updated:
              Resolved: