Environment:
- Ran Docker container on Ubuntu
- Was using version 26.4.2
- All settings are in default
How I set up test schema to reproduce issue (using Studio):
- Create vertex Type "Experiment"
- Add property "pk" to Experiment, set Mandatory and Not Null to true
- Add index on "pk", Index Algorithm is Hash, set Unique to true
Ran this command in Studio using Open Cypher:
MERGE (v:Experiment {pk: "a"})
ON CREATE SET v.status="created"
ON MATCH SET v.status="updated"
RETURN v
First run will create the vertex. Second run of same command will fail with the error Duplicated key [a] found on index 'Experiment[pk]' already assigned to record #80:0 due to the index on "pk" only allowing unique values. I was expecting it to update the "status" property to "updated" but it seems to try and create another vertex.
I've also tested it on "latest" tag which was 26.5.1-SNAPSHOT (build e88e6e4/1778019236199/main) and still see this same issue.
Interestingly, when I tested it on previous 26.3.2 release, there was no issue. The MERGE successfully matches the vertex and updated it accordingly.
Environment:
How I set up test schema to reproduce issue (using Studio):
Ran this command in Studio using Open Cypher:
First run will create the vertex. Second run of same command will fail with the error
Duplicated key [a] found on index 'Experiment[pk]' already assigned to record #80:0due to the index on "pk" only allowing unique values. I was expecting it to update the "status" property to "updated" but it seems to try and create another vertex.I've also tested it on "latest" tag which was 26.5.1-SNAPSHOT (build e88e6e4/1778019236199/main) and still see this same issue.
Interestingly, when I tested it on previous 26.3.2 release, there was no issue. The MERGE successfully matches the vertex and updated it accordingly.