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

    • Task
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • WT10.0.0, 4.9.0, 4.4.5
    • None
    • None
    • 3
    • Storage - Ra 2021-03-08

    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

            haseeb.bokhari@mongodb.com Haseeb Bokhari (Inactive)
            haseeb.bokhari@mongodb.com Haseeb Bokhari (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: