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

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

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • WT10.0.0, 4.9.0, 4.4.5
    • Affects Version/s: None
    • Component/s: None
    • None
    • 3
    • Storage - Ra 2021-03-08

      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)); 

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

              Created:
              Updated:
              Resolved: