-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
User-defined vertex ids - why do they need to end in 000? #1770
Comments
Suffix 000 is for NormalVertex. The suffix are described in the following file: https://github.com/JanusGraph/janusgraph/blob/master/janusgraph-core/src/main/java/org/janusgraph/graphdb/idmanagement/IDManager.java#L35-L55 |
I am also confused about this behavior, i try to use customized vertex id, but i found that i can only use id with value times by 8 (like 256, 264, 272...). What should i do if i want to control vertex id totally free. |
You need to call |
Thanks for your answer, actually I have tried as your suggestion, for example a execution like Expect your further answer, thanks! |
No, that is not possible by design. Different suffixes are used by different types of vertices, many of which are reserved. Normal user vertices always have 000 as the suffix. |
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?
The text was updated successfully, but these errors were encountered: