JanusGraph / JanusGraph/janusgraph
Janusgraph Gremlin addE created different vertices id after index implemented
- Dominant language
- Java
- Stars
- 5.8k
- Forks
- 1.2k
- Avg merge
- 13h 53m
- Merged PRs (30d)
- 6
Description
Please include configurations and logs if available.
For confirmed bugs, please report:
- Version: 0.6.0
- Storage Backend: cql
- Mixed Index Backend: elasticsearch
We are trying to create edge with existing vertex. However, after adding the edge, janusgraph return another vertex id to us. We found that there is two vertex id with same vertex.
We have tested that the id is right before implementing indexing.
Here is the testing case.
```
gremlin> g.V().count()
==>0
gremlin> tom = g.addV("party").property("name", "Tom").property("identity_number", "01234567")\
.property("identity_type", "PASSPORT").property("identity_country", "USA").next()
==>v[57402]
gremlin> mary = g.addV("party").property("name", "Mary").property("identity_number", "76543210")\
.property("identity_type", "PASSPORT").property("identity_country", "USA").next()
==>v[61626]
gremlin> g.V(tom).addE('relationship').to(mary)
==>e[3k4-18ci-80et-1bia][57474-relationship->61570]
gremlin> g.V(tom).bothE().otherV().path().by(__.valueMap().with(WithOptions.tokens))
==>path[{id=57402, label=party, identity_country=[USA], identity_number=[01234567],\
identity_type=[PASSPORT], name=[Tom]}, {id=3k4-18ci-80et-1bia, label=relationship},\
{id=57474, label=party, identity_country=[USA], identity_number=[01234567], identity_type=[PASSPORT],\
name=[Tom]}]
gremlin> g.V().count()
==>2
```
- Expected Behavior:
Create edge with AddE to existing vertex. The vertex should return the id.
- Current Behavior:
After index implemented, the id is different from the origin.
- Steps to Reproduce:
we have tested that it is alright before implementing index.
Since there is two different id for a single vertex. We cannot implement custom id for those vertex. The index of Elasticsearch is different from the id of the vertex that returned at janusgraph .
Could anyone can explain it is a normal behavior? Or it is a bug on janusgraph? Thanks
Contributor guide
Research direction
Start with the supplied Gremlin reproduction and the reported JanusGraph 0.6.0 configuration using Cassandra and Elasticsearch. Review the relevant vertex and edge creation behavior, then determine whether the duplicate vertex IDs are expected or indicate a bug, documenting the conditions and evidence needed to reproduce or explain it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cassandra, elasticsearch, java
- Domain
- databases, search
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100