JanusGraph / JanusGraph/janusgraph
User-defined vertex ids - why do they need to end in 000?
- Dominant language
- Java
- Stars
- 5.8k
- Forks
- 1.2k
- Avg merge
- 13h 53m
- Merged PRs (30d)
- 6
Description
[](https://groups.google.com/forum/?hl=En&nomobile=true#!topic/janusgraph-users/xM8jAGLsklQ)
I tried to define a user-id but I have encountered the same issue as above, which i have to supply id that ends in 000.
And on line 507 of StandardJanusGraphTx, we have this pre-condition:
`Preconditions.checkArgument(vertexId == null || IDManager.VertexIDType.NormalVertex.is(vertexId), "Not a valid vertex id: %s", vertexId);`
What's the reason for this constraint? And could this be a bug? Should the pre-condition be applied to VertexIDType.UserVertex instead?
Contributor guide
Research direction
Start with the linked discussion and the precondition at line 507 of StandardJanusGraphTx, then trace IDManager.VertexIDType.NormalVertex and UserVertex. Determine why user-defined vertex IDs must end in 000 and whether the precondition accepts the wrong ID type; done means the behavior is explained and any required correction is covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100