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

Allow extensions to be built into the WiredTiger library

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: WT2.3.0
    • Component/s: None
    • Labels:

      Description

      In some situations requiring a shared library for compression is a hassle. For example the WiredTiger LevelDB API will always require snappy, and it's not obvious where to find the WiredTiger snappy shared object. Similarly for any WiredTiger Node APIs - especially since Node requires libraries to be statically linked.

      A proposal is to add a new option to configure of the form:

      --with-builtins=snappy
      

      What the option will do is:

      • Change the entry point for the WiredTiger snappy library from

         to 

        snappy_extension_init

         (or similar).
        * Have the WiredTiger snappy library code built into the WiredTiger library.
        * Create a new string that is something like: 

        #define BUILTIN_EXTENSIONS="snappy"

        * Add functionality to 

        ___conn_load_extensions

        , so that it loads the built in snappy library (using the BUILTIN_EXTENSIONS string). It can do this by using 

        dlopen(null, ...)

        , or via a direct call to the function - depending on whether we want code in conn_api.c to be conditionally compiled.
        * Disallow both 

        -enable-snappy

         and 

        -with-builtins=snappy

         to the same configure command.
         
        Further.. This scheme should be extensible, so we can support a list of built in extensions. For example:
        
        


        --with-builtins=snappy,zlib
        `

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                alexander.gorrod Alexander Gorrod
                Reporter:
                alexander.gorrod Alexander Gorrod
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: