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

Fix __wt_hs_upd_find wrongly returns WT_NOTFOUND

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: WT3.2.2, 4.9.0
    • Component/s: None
    • Labels:
      None
    • Story Points:
      3
    • Sprint:
      Storage - Ra 2020-11-30

      Description

      __wt_hs_upd_find wrongly returns not found because of an unused upd variable.

          if (ret == 0) {
              /* Couldn't find a record. */
              if (upd == NULL) {
                  ret = WT_NOTFOUND;
                  WT_STAT_CONN_INCR(session, cache_hs_read_miss);
                  WT_STAT_DATA_INCR(session, cache_hs_read_miss);
              } else {
                  WT_STAT_CONN_INCR(session, cache_hs_read);
                  WT_STAT_DATA_INCR(session, cache_hs_read);
              }
          }
      

      Here upd is initialized to NULL and never assigned apart from being used as a temporary variable when freeing the remaining modify updates.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              chenhao.qu Chenhao Qu
              Reporter:
              chenhao.qu Chenhao Qu
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: