janusgraph
janusgraph copied to clipboard
Local configurations not applied when using ConfiguredGraphFactory
When creating Graphs using ConfiguredGraphFactory, a TemplateConfiguration is used to generate a configuration for each graph. Once a graph is created, its configuration is manifested and can not be changed later on by providing different environment variables.
We noticed this issue specifically when trying to set graph.replace-instance-if-exists. According to the documentation, it should be allowed to operate two JanusGraph instances on the same graph and have both use different settings for graph.replace-instance-if-exists. However, with ConfiguredGraphFactory, this is not the case. Judging from the code, other configuration options are affected as well.
- Version: 1.0.0
- Storage Backend: any
- Mixed Index Backend: any
- Expected Behavior: LOCAL settings are read from environment variables and applied to all graphs
- Current Behavior: Any settings from environment variables are ignored for all graphs
- Steps to Reproduce:
- Start JanusGraph instance with local setting
key=value1 - Create
TemplateConfigurationwithConfiguredGraphFactory - Create a graph using
ConfiguredGraphFactory - Shutdown JanusGraph instance and start a new instance with local setting
key=value2 - The previously created graph is now still running with
key=value1instead ofkey=value2.
- Start JanusGraph instance with local setting