Is it safe to use mounted block storage as the Xodus database path? The idea is to run the application that uses Xodus in several different hosts. So each Xodus-based application is pointing to the same mounted path (e.g /mnt/xodus
)
In this case, each application opens the Xodus environment like in the code below. If we open the environment like this:
@Override
public Environment getEnvironment(String xodusRoot, String instance) {
Environment environment = environmentMap.get(xodusRoot + instance);
if (environment == null) {
EnvironmentConfig config = new EnvironmentConfig();
config.setLogCacheShared(false);
Environment env = Environments.newInstance(xodusRoot + instance, config);
environmentMap.put(xodusRoot + instance, env);
}
Environment e = environmentMap.get(xodusRoot + instance);
return e;
}
Is it safe for multiple Xodus instances to point to a mounted path?