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

Stricter comparison when checking if prefetch is enabled

    • Storage Engines
    • 2
    • 2024-03-05 - Claronald

      In the following code, we would get inside the if statement as long as the error code is not WT_NOTFOUND. We should only execute that code when the returned value is 0:

      @@ -513,7 +514,7 @@ __session_reconfigure(WT_SESSION *wt_session, const char *config)
            * Override any connection-level pre-fetch settings if a specific session-level setting was
            * provided.
            */
      -    if (__wt_config_gets(session, cfg + 1, "prefetch.enabled", &cval) != WT_NOTFOUND) {
      +    if (__wt_config_gets(session, cfg + 1, "prefetch.enabled", &cval) == 0) {
               if (cval.val) {
                   if (!S2C(session)->prefetch_available) {
                       F_CLR(session, WT_SESSION_PREFETCH);
      

            Assignee:
            clarisse.cheah@mongodb.com Clarisse Cheah
            Reporter:
            etienne.petrel@mongodb.com Etienne Petrel
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: