Schema creation with groovy script does not work on inmemory setup
Hello, all. We are facing an issue while trying to create a schema by executing a groovy script with an inmemory setup. Below are the steps to reproduce:
Create container via docker compose -f docker-compose.yml up -d (see attachments).
Use the schema.groovy (see attachments) file to instantiate graph. In order to do this, we must:
- copy this file to jg container with: docker cp schema.groovy gp-jg:/opt/
- then connect to the JG server via Gremlin console 3.7.0 without session mode like:
:remote connect tinkerpop.server conf/remote.yaml
:remote console
- In gremlin console, call: evaluate(new File("/opt/schema.groovy"))
After performing these steps, we do not have any errors, however, we also do not see any vertex labels created (person vertex label is missing)(see attached screenshot). The expected behavior is that the 'person' vertex label has been added to schema.
Two notes regarding this: 1. Without the line: ConfiguredGraphFactory.close("test"), the person is created as expected. 2. With a CQL backend (not inmemory), the scripts works fine with or without close statement as expected.
An additional note, the above are the steps to reproduce this problem with gremlin console but eventually our use case is to submit the schema creation script via python. In order to do this, recreate the container with docker compose, and run python_script.py (note: gremlinpython==3.7.0 pip package is expected to be installed first). When this is done, we actually get a Infinite recursion error. To see more, look at "error_logs.txt" attachment.
0 Replies