JanusGraph / JanusGraph/janusgraph

Management::get method does not reflect maskable configs

Open
#3,104 5 comments 0 reactions 0 assignees View on GitHub
area/docs kind/enhancement
Dominant language
Java
Stars
5.8k
Forks
1.2k
Avg merge
13h 53m
Merged PRs (30d)
6

Description

This is modified from the existing test.
```java
@Test
public void updateConfigurationTest() throws Exception {
final MapConfiguration graphConfig = getGraphConfig();
final String graphName = graphConfig.getString(GRAPH_NAME.toStringWithoutRoot());

try {
ConfiguredGraphFactory.createConfiguration(graphConfig);
final StandardJanusGraph graph = (StandardJanusGraph) ConfiguredGraphFactory.open(graphName);
assertNotNull(graph);

final Map map = graphConfig.getMap();
map.put("query.batch", true);
ConfiguredGraphFactory.updateConfiguration(graphName, ConfigurationUtil.loadMapConfiguration(map));
assertNull(gm.getGraph(graphName));

JanusGraph graph2 = ConfiguredGraphFactory.open(graphName);
// THIS FAILS! It still returns the default value, false
assertEquals("true", graph2.openManagement().get("query.batch"));
} finally {
ConfiguredGraphFactory.removeConfiguration(graphName);
ConfiguredGraphFactory.close(graphName);
}
}
```

Compared to the existing test (that is passing!) where we modify https://github.com/JanusGraph/janusgraph/blob/ba93c4bfda9e4c72b01aae7dc2ee9c3c5b5f37d1/janusgraph-backend-testutils/src/main/java/org/janusgraph/core/AbstractConfiguredGraphFactoryTest.java#L228 in the above example, we modify `query.batch` option. Somehow the change is not reflected.

Contributor guide

Open the contributing guide

Research direction

Start with updateConfigurationTest in janusgraph-backend-testutils/src/main/java/org/janusgraph/core/AbstractConfiguredGraphFactoryTest.java and reproduce the query.batch case described in the issue. Trace how ConfiguredGraphFactory.updateConfiguration and Management::get handle that configuration, then make the test pass with the updated value reflected instead of the default false.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.