Template configuration parameters with comma-separated lists in Janusgraph 0.6.0
Mladen Marović
Hello, I wanted to try out the new Janusgraph 0.6.0 release and I encountered some unexpected issues while trying to deploy it on Cassandra 3.11.5. One of the issues I came across seems to be connected to the switch to commons-configuration2. In previous Janusgraph versions, I used a startup script to create a configuration template for graphs and a single
An important piece of this was the line After installing Janusgraph 0.6.0 I used a similar script, but with
The script executed without errors, but the graph
This indicates that the string was split somewhere along the way, and the resulting array
I even tried to manually set the delimiter in my script to be something other than Did anyone else come across this issue? Did I miss something else in the changelog about this? Kind regards, Mladen Marović |
|
hadoopmarc@...
Hi Mladen,
The good news: there actually is an explicit MultiHost test for this in the janusgraph test suite: https://github.com/JanusGraph/janusgraph/blob/v0.6.0/janusgraph-cql/src/test/java/org/janusgraph/core/cql/CQLConfiguredGraphFactoryTest.java The bad news: I could not get this test to run in my local environment. When I do (requires the docker service running): $ git checkout v.0.6.0 $ mvn clean install -DskipTests $ mvn test -Dtest=CQLConfiguredGraphFactoryTest -pl janusgraph-cql -Pcassandra3-murmur -e all 21 tests fail with: Caused by: org.janusgraph.graphdb.management.utils.ConfigurationManagementGraphNotEnabledException: Please add a key named "ConfigurationManagementGraph" to the "graphs" property in your YAML file and restart the server to be able to use the functionality of the ConfigurationManagementGraph class.As far as I can see, the tests are run on github CI, see: https://github.com/JanusGraph/janusgraph/blob/master/.github/workflows/ci-backend-cql.yml However, I cannot access the CI logs right now. I do not know where to go from here. Best wishes, Marc On Tue, Sep 21, 2021 at 02:29 PM, Mladen Marović wrote: ConfiguredGraphFactory |
|
Boxuan Li
Hi Mladen,
As Marc pointed out, this scenario is tested in the JanusGraph codebase. I noticed your error log contains:
It seems that you have redundant brackets around the value. Try using "test-master, test-worker1" rather than "[test-master, test-worker1]". Let me know if this helps. Best, Boxuan |
|
Mladen Marović
Hi, thanks for the replies. However, my point was that I'm explicitly setting a value WITHOUT brackets when creating a template configuration in the startup script:
, which also shows when I inspect that template configuration:
, but when I create a new graph, it is created using a value WITH brackets:
which then produces the error when trying to open the graph. To reiterate, I'm using a very similar script in 0.5.3 which works without any issues, but in 0.5.3 I disable list parsing manually when creating the template. In 0.6.0 the codebase switched to commons-configuration2 which has list parsing disabled by default, so I don't think I should have to disable it again. Even if I do, or use a different delimiter, it still doesn't work because creating the template configuration seems to work fine, but creating a new graph from that configuration does not. I hope the issue itself is more clear now. Kind regards, Mladen Marović |
|
hadoopmarc@...
Hi Mladen,
After your original post, the following issue was reported: https://github.com/JanusGraph/janusgraph/issues/2822 Marc |
|
Mladen Marović
Hi Marc, thanks for the reply, but the error in the linked issue is a bit different, and also I'm already using I found a somewhat hackish workaround that seems to create the graph properly. Instead of using:
, I manually create a configuration from the template and open the graph:
After doing this, the graph is created seemingly without errors and I can use it as before. I would expect Kind regards, Mladen Marović |
|
hadoopmarc@...
Hi Mladen,
You are right, your issue is different than the one I mentioned about GraphManager. I mentioned earlier that the JanusGraph test suite covers your use case: https://github.com/JanusGraph/janusgraph/blob/v0.6.0/janusgraph-cql/src/test/java/org/janusgraph/core/cql/CQLConfiguredGraphFactoryTest.java You can verify in the CI logs that this test passes successfully, see e.g. for a recent commit on master (the line starting with "Run mvn verify"): https://github.com/JanusGraph/janusgraph/runs/3775465848?check_suite_focus=true I do acknowledge that the return value you mention for
look suspicious, but in what way does your use case differ from the tests with "MultiHost" CQL?Best wishes, Marc |
|
Mladen Marović
Hello, I ran the test The test contains the following lines:
The next line in the test, However, it seems to me that the problem appears in the configuration saved at the end of the
This test crashes when trying to open Since list parsing is forced when opening the graph both as part of the
the test passed without issues. I haven't tried building a custom Janusgraph release to test this change fully in my case yet, but I suspect that it should be OK. If someone else can confirm that this is indeed a bug, I'll be happy to open an issue on GitHub and submit a PR. Kind regards, Mladen Marović |
|
Boxuan Li
Hi Mladen,
I can confirm this is indeed a bug. I apologize that when writing the test, I didn't notice the second open call was just returning the cached instance. Thank you for reporting and fixing it! It would be great if you could create an issue and a pull request for it. Best regards, Boxuan |
|
Mladen Marović
Hi Boxuan, thanks for the confirmation, no need to apologize. I created the related issue at https://github.com/JanusGraph/janusgraph/issues/2833 and will submit a pull request after some more testing. Kind regards, Mladen Marović |
|