Unconfigured table exceptions 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. The first issue occurs during graph creation. I'm trying to set up a ConfiguredGraphFactory. When starting Janusgraph for the first time, it attempts to create its internal tables ('graphindex', 'janusgraph_ids', ...), but sometimes fails to create a table and throws the following exception:
Inspecting the keyspaces via
Upon restarting, Janusgraph continues from where it last failed and tries to create the other missing tables. Eventually,
I tried to test this multiple times by shutting down Janusgraph, dropping its keyspaces in Cassandra, and starting it again. Sometimes it successfully finishes from the first try, sometimes it fails once, and sometimes multiple times, on different tables. As for the relevant configuration, I've updated it according to the 0.6.0 changelog. I'm using the following
and
Since this is my first look at Janusgraph 0.6.0, I'm testing it on two local VMs. I'm using Ansible scripts to automate the deployment for Janusgraph, Cassandra and Elasticsearch, and the entire setup has previously been tested on multiple different Janusgraph versions (0.2.0, 0.3.1, 0.4.0, 0.5.1, 0.5.3) and on several different environments. Therefore, I do not expect there to be any issues with Cassandra, Elasticsearch, the deployment scripts, or the setup itself, unless I missed some breaking change in the 0.6.0 changelog that I'm not aware of. Did anyone else have a similar issue? Kind regards, Mladen Marović P.S. Since this turned out to be a lengthy post, I'll create another post about the other issue I mentioned. |
|
Hi,
Mladen that issue is most likely related to this discussion of how the new CQL driver updates schema view: https://groups.google.com/a/lists.datastax.com/g/java-driver-user/c/Bc0gQuOVVL0 As suggested in that thread, to improve performance we set metadata_schema_window to 0 (to keep schema creation performance similar to the previous driver). That said, we probably made a mistake when hardcoded that value to 0. We probably should make it configurable in the next minor release. (you can see that configuration set here: https://github.com/JanusGraph/janusgraph/blob/abe67055a23c729d55e0e4ac1508189d93f9820c/janusgraph-cql/src/main/java/org/janusgraph/diskstorage/cql/builder/CQLProgrammaticConfigurationLoaderBuilder.java#L144) Luckily, there is a way to overwrite JanusGraph default CQL Driver configurations. See explanation here (configuration options under `storage.cql.internal`): https://docs.janusgraph.org/configs/configuration-reference/#storagecqlinternal Probably the easiest way to overwrite that value as for now would be to use `storage.cql.internal.string-configuration`. I.e. something like: ``` storage.cql.internal.string-configuration = "datastax-java-driver { advanced.metadata.schema.debouncer.window = 1 second }" ``` The DataStax default value is "1 second" thus, I would recommend to try 1 second as they recommend. In case that isn't enough you could try to increase that value but be aware that your schema creation (i.e. new graphs initial creation) will be longer due to this window delay. I have opened the issue to tack here: https://github.com/JanusGraph/janusgraph/issues/2809 Let me know if increasing `advanced.metadata.schema.debouncer.window` helps with your issue. Best regards, Oleksandr Porunov |
|
You can also play with `advanced.metadata.schema.debouncer.max-events`. For more configurations see: https://docs.datastax.com/en/developer/java-driver/4.13/manual/core/configuration/reference/
|
|
Also, notice, if you want to use multiple configuration options, you will need to split them using new line character. I.e. `\n` and not `;`.
See example here: https://github.com/JanusGraph/janusgraph/blob/26a06a0d27931d5e97ca7870493336fe21b522be/janusgraph-cql/src/test/java/org/janusgraph/diskstorage/cql/CQLConfigTest.java#L98 |
|
Mladen Marović
Hello, thanks for the responses. I attempted to add
I'm guessing something's wrong with the syntax, but I couldn't get it right. Instead, I set
This seems to give acceptable results because out of about 20-25 attempts at creating different graphs, only one resulted in the same error as before. For completeness, i also went to the extreme by setting the same parameter to
so I'm guessing there are some other timeouts to consider as well, but did not look further into that. Additionally, I also tested
Right now setting Kind regards, Mladen Marović P.S. I managed to get the string configuration to work as well by adding |
|
Great to hear that worked for you.
As seen from this PR: https://github.com/JanusGraph/janusgraph/pull/2812 the default cql request timeout of 10 seconds isn't applied if you don't provide it explicitly. Thus, it now default to 2 seconds (as seen from DataStax driver default configurations). You can set it explicitly by providing the next config: `storage.cql.request-timeout = 10000` (to make it 10 seconds timeout). Best regards, Oleksandr Porunov |
|