JanusGraph / JanusGraph/janusgraph
Custom Vertex Id (string) on non-existent vertex returns a new vertex
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 5.8k
- Forks
- 1.2k
- Avg merge
- 13h 53m
- Merged PRs (30d)
- 6
Description
Potential bug report when using custom vertex id's
Cannot check vertex existence via usual query because a non-existent vertex returns a new vertex instead of null as expected.
- Version: v1.0 branch
- Storage Backend: CQL
- Mixed Index Backend: elasticsearch
- Expected Behavior: gremlin query on non-existent vertex returns null
- Current Behavior: gremlin returns a new empty vertex
- Steps to Reproduce:
a. create a graph with custom vertex id (as string)
1) graph options "set-vertex-id" and "allow-custom-vid-types" = true
2) query for any non-existent vertex: g.V("mycustomid")
3) gremlin returns a vertex with that id and "label=vertex"
4) should return null to indicate vertex not found
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing g.V("mycustomid") with the set-vertex-id and allow-custom-vid-types options enabled, using the CQL storage backend and Elasticsearch mixed index. Trace how a custom string ID is resolved when the vertex does not exist. Done means the query returns null rather than a new empty vertex labeled "vertex".
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elasticsearch, java
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100