pm_osc
Explore posts from serversJJanusGraph
•Created by pm_osc on 6/26/2024 in #questions
Incremental schema changes - Property Key constraint does not exist
Hi All, in our use-case the graph schema is changing over time and we have issues to incrementally add properties to the schema as we get error in the below scenario:
1. day 1: we create a graph with an initial schema: person node with
firstName
property.
2. day 2: we try adding lastName
property to the person node. This still works and one can create persons with lastName
3. day 3: we try adding fullName
property to the person node. This does not work any more as gp_traversal.addV('person').property('fullName', 'test full name')
throws error: Property Key constraint does not exist for given Vertex Label [person] and property key [fullName].
We use JanusGraph 1.0.0 with Cassandra 4.0.11 backend.
Below are some snippets to reproduce the above. Could you please have a look and tell us what we are doing wrong?
Day 1 - create initial schema in Gremlin console with session mode - see day1.groovy enclosed
Day 2 - adding lastName property to the person node in Gremlin console with session mode - sew day2.groovy
At this point, once we connect to the graph database, gp_traversal.addV('person').property('lastName', 'test last name')
works fine.
Day 3 - adding fullName property to the person node in Gremlin console with session mode - see day3.groovy
At this point, once we connect to the graph database, gp_traversal.addV('person').property('fullName', 'test full name')
throws Property Key constraint does not exist for given Vertex Label [person] and property key [fullName].
We have checked with printSchema()
and all properties are created as expected, so gp_traversal.addV().property('fullName', 'test full name')
works fine. Once we tried mgmt.getVertexLabel('person').mappedProperties()
we could not see fullName
property listed.
We have noticed that if we stop and restart JanusGraph, the fullName
property starts working as expected but we are looking for a way to modify the schema without restarting the server.
Thank you.5 replies
JJanusGraph
•Created by pm_osc on 4/2/2024 in #questions
JanusGraph authentication - restricted privileges
Hi All, we secured our JanusGraph with SaslAuthenticationHandler as desribed in the docs (https://docs.janusgraph.org/operations/server/#advanced-janusgraph-server-configurations).
The defined user now can be used to read/write data in the graph database as well as for managing the schema.
Is there a way to create a user that can only perform read/write on the graph but cannot change the schema? Thank you for any pointer on this.
5 replies
JJanusGraph
•Created by pm_osc on 3/10/2024 in #questions
JG 0.6 vs JG 1.0 different behaviour for same Gremlin query
Hi All,
I have noticed some difference between JG 0.6 and JG 1.0.
I have a person node created as follows: g.addV('person').property('firstName', 'John').property('lastName', 'Doe')
Then I run the following query:
g.V().
has("firstName", "John").
has("lastName", "Doe").
project("firstName", "lastName", "fullName").
by("firstName").
by("lastName").
by("fullName")
On JG 0.6, the result was:
==>{firstName=John, lastName=Doe, fullName=null}
On JG 1.0, the result is:
==>{firstName=John, lastName=Doe}
So, for some reason, JG 1.0 does not seem to return the 'null' fullName any more. Could you please help me if this behaviour is expected? Thank you.
4 replies
JJanusGraph
•Created by pm_osc on 2/5/2024 in #questions
Elasticsearch mixed index performance
Hi All, we use JanusGraph 1.0 with Cassandra storage backend and 3 node cluster Elasticsearch index backend. We try to ingest 100.000 nodes. Our nodes are very simple for benchmarking purpose: all are person nodes with id, first name and last name properties. 'id' has a composite index, first name and last name are supposed to have mixed index. At this point we don't ingest any edges.
Ingestion time of 100.000 nodes without any mixed index (only composite index for 'id') took for us 2 minutes. While ingesting the same data with mixed index on first name and last name took 50 minutes which is significantly slower.
I am wondering if we misconfigured something or using mixed index is expected to slow down ingestion so drastically?
Do you have any suggestion or idea on how to speed up mixed indexing?
Thank you.
Peter
9 replies
JJanusGraph
•Created by pm_osc on 11/20/2023 in #questions
JanusGraph 1.0 full-text search predicate in python - broken
Hi All,
with JanusGraph 0.6 and gremlin-python 3.5.4, I was able to use the following in Python to use JanusGraph full-text search predicate:
-----
from gremlin_python.process.traversal import P
g.V().has('firstName', P('textRegex', 'john')).toList()
-----
with JanusGraph 1.0 and gremlin-python 3.7.0, I am getting the following error:
Received error message '{'requestId': 'None', 'status': {'code': 499, 'message': 'Invalid OpProcessor requested [null]', 'attributes': {}}, 'result': {'meta': {}, 'data': None}}'
Could you please suggest any workaround how to make the above query work on JanusGraph 1.0 and gremlin-python 3.7.0? Thank you.
18 replies