Date 1 - 3 of 3
Unable to delete/modify vertices of static labels
Thanks for the reply.
We want to do the deletion in 2 ways:-
1- Delete the vertex before the ttl expires. (in some use case)
2- Automatic deletion of vertex by janusgraph-cassandra itself (through JanusgraphManagement ttl implementation).
Both of the above problem can be implemented if we don't have to use static vertex for TTL.
Now, according to your solution, we have to write a batch process, where we have to loop through all the vertex labels in our db, and also run that process from time to time. We dont want to implement this thing explicitly.
Also, the jira link which you gave, points to the issue where TTL is not implemented for old vertices. But our issue is implementation of TTL in normal vertices (which are not static), so that we can delete/modify them when ever it is required.
So, if the above problem is not possible to implement now, then can this issue be raised as a new one in jira?.
Thanks and regards,
Robert Dale <rob...@...>
toggle quoted message Show quoted text
If you need to modify a vertex or possibly delete it before the TTL, then you'll probably want to create a regular vertex. You could create a 'ttl' property and a mixed index on it. In this way, you could create a reaper process that does g.V().has('mylabel', 'ttl', lt(currentTime-ttl)).drop().
I've created an issue to clarify the documentation and think about creating a way to delete static vertexes - https://github.com/JanusGraph/janusgraph/issues/549
On Mon, Sep 25, 2017 at 2:11 AM, <abhayti...@...> wrote:
I have made some vertices using Janusgraph-api in java and used Cassandra as backend db. I wanted to use TTL, so I made static vertex labels using JanusgraphManagement. Vertex Labels were made using this code :-
JanusGraphSchemaType vertexLabel = mgmt.makeVertexLabel(label).setStatic().make();
But now I am unable to delete those vertices, as it is throwing this error everytime :-
org.janusgraph.core.SchemaViolationException: Cannot modify unmodifiable vertex: v
at org.janusgraph.graphdb.transaction.StandardJanusGraphTx.verifyWriteAccess(StandardJanusGraphTx.java:281) ~[janusgraph-core-0.1.1.jar:na]
at org.janusgraph.graphdb.transaction.StandardJanusGraphTx.removeRelation(StandardJanusGraphTx.java:605) ~[janusgraph-core-0.1.1.jar:na]
I understand that, since vertex labels are static, we cannot delete it. So, is there any way, wherein we may be able to delete/modify vertices as well as set TTL to them using Janusgraph and Cassandra.
|1 - 3 of 3|