dosubot[bot] commented on issue #2742: URL: https://github.com/apache/incubator-hugegraph/issues/2742#issuecomment-2700772668
<!-- Answer --> In HugeGraph, when using the memory backend, the default behavior for handling duplicate entries is to merge columns if the entry already exists. This means that if you attempt to insert a vertex with a duplicate primary key, the system will not throw an exception but will instead merge the new entry with the existing one. This is why your test case is passing without an error, and only one vertex is present in the result <sup>[[1]](https://github.com/apache/incubator-hugegraph/blob/master/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/memory/InMemoryDBTable.java)</sup>. Currently, there is no configuration option available to change this default behavior of merging entries in the memory backend <sup>[[1]](https://github.com/apache/incubator-hugegraph/blob/master/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/memory/InMemoryDBTable.java)</sup>. If you require different behavior, such as throwing an exception for duplicate primary keys, you might need to implement custom logic or consider using a different backend that supports such a feature. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/d4d106cf-3884-410f-b894-a03ab5b91eb3?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/d4d106cf-3884-410f-b894-a03ab5b91eb3?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/d4d106cf-3884-410f-b894-a03ab5b91eb3?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/d4d106cf-3884-410f-b894-a03ab5b91eb3?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/d4d106cf-3884-410f-b894-a03ab5b91eb3?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/d4d106cf-3884-410f-b894-a03ab5b91eb3?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/d4d106cf-3884-410f-b894-a03ab5b91eb3?feedback_type=other)</sup> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
