WiredTiger supports Levyx Inc., Helium Data Store volumes as a data-source.
To configure one or more Helium volumes as WiredTiger data sources, take the following steps.
To build the Helium support, use the configuration option –with-helium=DIR. For example:
Next, add code to your application to load the Helium shared library.
The following example loads the Helium shared library, configuring and naming two separate Helium volumes. The first volume is named dev1, the second volume is named dev2. Volume dev1 has two underlying physical Helium devices, /dev/disk3s1 and /dev/disk4s1. Volume dev2 has a single underlying physical Helium device, /dev/disk5s1.
The helium_devices configuration string takes a WiredTiger string which is a comma-separated list of Helium devices. (Note the quoting required for that to be possible.)
In this example, both Helium volumes are configured to be truncated when first opened, and all previously existing contents discarded.
When configuring a Helium volume, the following non-standard configuration strings are supported:
| String | Type | Meaning |
|---|---|---|
| helium_devices | list | WiredTiger URI to Helium volume mapping |
| helium_env_read_cache_size | int | struct he_env read_cache_size value |
| helium_env_write_cache_size | int | struct he_env write_cache_size value |
| helium_o_volume_truncate | boolean | HE_O_VOLUME_TRUNCATE flag |
With the exception of the configuration string helium_devices (which is WiredTiger specific), see the Helium documentation for details on their use.
When creating WiredTiger objects on Helium volumes, the volume names are used as part of the URI specified to WiredTiger methods such as WT_SESSION::create or WT_SESSION::rename, separated from the object name by a single slash character.
Additionally, the helium type configuration string must be included.
The following example creates a table named access on the Helium volume dev1, and then opens a cursor on the table:
When calling WT_SESSION::create to create an object on a Helium volume, the following additional configuration strings are supported:
| String | Type | Meaning |
|---|---|---|
| helium_o_compress | boolean | HE_I_COMPRESS flag |
| helium_o_truncate | boolean | HE_O_TRUNCATE flag |
See the Helium device documentation for details on their use.
For example, creating and truncating a table could be done as follows: