JanusGraph / JanusGraph/janusgraph

Local configurations not applied when using ConfiguredGraphFactory

Open
#4,138 0 comments 0 reactions 0 assignees View on GitHub
area/core kind/bug/possible
Dominant language
Java
Stars
5.8k
Forks
1.2k
Avg merge
13h 53m
Merged PRs (30d)
6

Description

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`.

Contributor guide

Open the contributing guide

Research direction

Start by tracing ConfiguredGraphFactory through TemplateConfiguration creation and graph configuration manifestation. Reproduce the issue with a local setting changing from key=value1 to key=value2 across a restart, then verify that the existing graph uses the new local value rather than the manifested value.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.