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

New cursor debug configuration isn't considered in __wt_cursor_cache_get

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: WT10.0.0, 4.9.0, 4.4.4
    • Component/s: None
    • Labels:
    • Story Points:
      3
    • Sprint:
      Storage - Ra 2020-12-28, Storage - Ra 2021-01-11

      Description

      In a WT-6563 debug=(release_evict) was added to the cursor api. However the new config wasn't added to __wt_cursor_cache_get's exclusion list as such it can be specified on open and wiredtiger will use a cached cursor instead of opening a new one.

      By using a cached cursor the flag we're interested in WT_CURSTD_DEBUG_RESET_EVICT, is never set and the cursor doesn't work as expected.

      The fix is pretty simple it should look like this:

      diff --git a/src/cursor/cur_std.c b/src/cursor/cur_std.c
      index 92b8e5c5b..c34d736b5 100644
      --- a/src/cursor/cur_std.c
      +++ b/src/cursor/cur_std.c
      @@ -798,6 +798,10 @@ __wt_cursor_cache_get(WT_SESSION_IMPL *session, const char *uri, WT_CURSOR *to_d
               if (cval.val)
                   return (WT_NOTFOUND);
       
      +        WT_RET(__wt_config_gets_def(session, cfg, "debug", 0, &cval));
      +        if (cval.len != 0)
      +            return (WT_NOTFOUND);
      +
               WT_RET(__wt_config_gets_def(session, cfg, "dump", 0, &cval));
               if (cval.len != 0)
                   return (WT_NOTFOUND);
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              sean.watt Sean Watt (Inactive)
              Reporter:
              luke.pearson Luke Pearson
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: