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

Ensure history store cursor is closed when there is an error after opening one

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: WT10.0.0, 4.9.0, 4.4.5
    • Component/s: None
    • Labels:
      None

      Description

      The aim of this tick is to review all use cases of history store cursor and ensure history store cursor is closed when there is an error after opening one.

      For example in the following code, an error returned from __wt_hs_delete_key_from_ts() can result in history store cursor that is never closed:

      WT_ERR(__wt_curhs_open(session, NULL, &hs_cursor));                        
      WT_ERR(__wt_hs_delete_key_from_ts(session, hs_cursor, btree->id, tmpkey, WT_TS_NONE, false));                        
      WT_ERR(hs_cursor->close(hs_cursor)); 

        Attachments

          Activity

            People

            Assignee:
            haseeb.bokhari Haseeb Bokhari
            Reporter:
            haseeb.bokhari Haseeb Bokhari
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: