Skip to content

Conversation

@li-boxuan
Copy link
Member

@li-boxuan li-boxuan commented Oct 30, 2024

public void createConfiguration(final Configuration config) {
Preconditions.checkArgument(config.containsKey(PROPERTY_GRAPH_NAME),
String.format("Please include the property \"%s\" in your configuration.",
PROPERTY_GRAPH_NAME
));
final Map<Object, Object> map = ConfigurationConverter.getMap(config);
final Vertex v = graph.addVertex(T.label, VERTEX_LABEL);
map.forEach((key, value) -> v.property((String) key, value));
v.property(PROPERTY_TEMPLATE, false);
graph.tx().commit();
uses ConfigurationManagementGraph, a special meta-graph to store real graph configs as vertex properties. By design, this "meta-graph" doesn't support custom vertex ID, because obviously users don't have a way to specify vertex IDs.

This PR adds a check in ConfigurationManagementGraph to make it clear that it's by design.

Fixes #4535


Thank you for contributing to JanusGraph!

In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:

For all changes:

  • Is there an issue associated with this PR? Is it referenced in the commit message?
  • Does your PR body contain #xyz where xyz is the issue number you are trying to resolve?
  • Has your PR been rebased against the latest commit within the target branch (typically master)?
  • Is your initial contribution a single, squashed commit?

For code changes:

  • Have you written and/or updated unit tests to verify your changes?
  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
  • If applicable, have you updated the LICENSE.txt file, including the main LICENSE.txt file in the root of this repository?
  • If applicable, have you updated the NOTICE.txt file, including the main NOTICE.txt file found in the root of this repository?

For documentation related changes:

  • Have you ensured that format looks appropriate for the output in which it is rendered?

@li-boxuan li-boxuan changed the title (WIP) Add a test to reproduce custom vertex id bug with ConfiguredGraphFactory ConfigurationManagementGraph to throw Exception with custom ID setting Nov 11, 2024
@li-boxuan li-boxuan marked this pull request as ready for review November 11, 2024 07:55
@li-boxuan li-boxuan requested a review from porunov August 9, 2025 02:32
@li-boxuan
Copy link
Member Author

lol I totally forgot about this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant