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

wiredtiger_open's extension configuration

    • Type: Icon: Task Task
    • Resolution: Done
    • WT1.6.4
    • Affects Version/s: None
    • Component/s: None

      The docs say this about the wiredtiger_open extensions configuration:

      list of shared library extensions to load (using dlopen). Optional values are passed as
      the config parameter to WT_CONNECTION::load_extension. For example,
      extensions=(/path/ext.so={entry=my_entry}).
      

      That looks to me like the application is supposed to append {{

      {entry=my_entry}

      }}, but it also looks to me like the code prepends entry too:

              /* Load any extensions referenced in the config. */
              WT_ERR(__wt_config_gets(session, cfg, "extensions", &cval));
              WT_ERR(__wt_config_subinit(session, &subconfig, &cval));
              while ((ret = __wt_config_next(&subconfig, &skey, &sval)) == 0) {
                      WT_ERR(__wt_buf_fmt(
                          session, &expath, "%.*s", (int)skey.len, skey.str));
                      if (sval.len > 0)
                              WT_ERR(__wt_buf_fmt(session, &exconfig,
                                  "entry=%.*s\n", (int)sval.len, sval.str));
                      WT_ERR(conn->iface.load_extension(&conn->iface,
                          expath.data, (sval.len > 0) ? exconfig.data : NULL));
              }
      

      I think the fix is to just delete "entry=" in the call to __wt_buf_fmt, my guess is this was added before the "terminate" configuration string was added to WT_CONNECTION.load_extension, when there was only one possibility, entry.

            Assignee:
            keith.bostic@mongodb.com Keith Bostic (Inactive)
            Reporter:
            keith.bostic@mongodb.com Keith Bostic (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: