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

New cursor debug configuration isn't considered in __wt_cursor_cache_get

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • WT10.0.0, 4.9.0, 4.4.4
    • Affects Version/s: None
    • Component/s: None
    • 3
    • Storage - Ra 2020-12-28, Storage - Ra 2021-01-11

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

            Assignee:
            sean.watt@mongodb.com Sean Watt
            Reporter:
            luke.pearson@mongodb.com Luke Pearson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: