VOL environment variables


#1

A nice feature of VOL is by setting 2 environment variables HDF5_VOL_CONNECTOR and HDF5_PLUGIN_PATH, users can enable the VOL without changing their application source codes.

While developing a new VOL, we found that HDF5 library caches the values of these 2 variables for the remaining run of the application, no matter if users call unsetenv/setenv to change them before calling H5Fcreate or H5Fopen. This can affect applications that want to open a file using the native VOL and create a new file using another VOL, for example.

It will be great if these 2 VOL env variables can be rechecked at each file create and open time. It makes VOL more flexible. Is there an issue making this happened can be a problem?


#2

The H5PL* code has functions for manipulating the path, they could be used to reread env vars and change the path.


#3

Could you please be more specific?
Is it function H5PL__replace_path()?
What lines of codes I should look into?


#4

see the H5PLpublic.h file for the APIs.


#5

@byrn, @wkliao said,

HDF5 library caches the values of these 2 variables for the remaining run of the application

How can manipulating environment variable with H5PL APIs help the user?


#6

Right. H5PL APIs do not seem to be able to change the VOL connector.