Skip to content
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

Create constraints in neo4j for nodeId and orgId #169

Closed
Powersource opened this issue Dec 22, 2020 · 3 comments · Fixed by #171
Closed

Create constraints in neo4j for nodeId and orgId #169

Powersource opened this issue Dec 22, 2020 · 3 comments · Fixed by #171

Comments

@Powersource
Copy link
Member

Documentation on constraints https://neo4j.com/docs/cypher-manual/current/administration/constraints/#administration-constraints-unique-nodes

As I was trying to fix #168 I was running MERGE (org:Org {orgId:$orgId}) which is supposed to be able to only create 1 node, their documentation even claims they have fancy locks and stuff. But a few times it managed to create 2 of the node, probably through some weird race condition. I don't think having the duplicates will break anything but doesn't hurt to add the constraints, I suspect that would even speed up the db?

@Powersource
Copy link
Member Author

Ok just tested with 2 of the same Org node and it crashed the frontend.

@Powersource
Copy link
Member Author

Not quite done yet, Server had a few duplicates and it won't start until I remove them

@Powersource
Copy link
Member Author

Was only one duplicate Person!

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

Successfully merging a pull request may close this issue.

1 participant