janusgraph icon indicating copy to clipboard operation
janusgraph copied to clipboard

Local configurations not applied when using ConfiguredGraphFactory

Open rngcntr opened this issue 2 years ago • 0 comments

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:
    1. Start JanusGraph instance with local setting key=value1
    2. Create TemplateConfiguration with ConfiguredGraphFactory
    3. Create a graph using ConfiguredGraphFactory
    4. Shutdown JanusGraph instance and start a new instance with local setting key=value2
    5. The previously created graph is now still running with key=value1 instead of key=value2.

rngcntr avatar Nov 24 '23 06:11 rngcntr