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

Bug - db.schema() returning non-existent relationships #9726

InverseFalcon opened this Issue Jul 27, 2017 · 7 comments


None yet
9 participants

InverseFalcon commented Jul 27, 2017

Reported on User slack channel, on Neo4j 3.2.2, call db.schema is showing some relationships that do not exist in the graph.

Some of the bad relationships seem like they're inferred transitive relationships ((:a)-[r]->(:b) exists and (:b)-[r]->(:c) exists but (:a)-[r]->(:c) doesn't exist in the graph, yet is part of the schema results), or inverted from actual relationships ((:a)-[r]->(:b) exists, but (:b)-[r]->(:a) does not, yet is part of the schema results).

They also ran call apoc.meta.graph() using APOC Procedures, which gives correct results, so something is off specifically in db.schema().


This comment has been minimized.

gjunqueira commented Jul 27, 2017

As agreed on Slack, I am sending some pictures to better clarify this situation.



This comment has been minimized.


jexp commented Jul 28, 2017

It's a known issue, which I fixed in APOC (but unfortunately it requires sampling the db so it makes it slower).

The root cause is that the db-statistics only store counts for (:Label)-[:TYPE]->() and ()-[:TYPE]->(:Label) but not the full pattern, so if you add the two together you get some false positives.

In db.schema() there was no one who could take it on, but I can try to fix it there too when I'm back from vacation.

@systay systay added the team-kernel label Jul 28, 2017


This comment has been minimized.

davidlrosenblum commented Jan 8, 2018

This bug still exists in 3.3.1. There is only a straight line relation PART_OF from System to Data Center. call db.schema
screen shot 2018-01-08 at 12 39 23 pm

The schema really looks like this
screen shot 2018-01-08 at 3 29 16 pm


This comment has been minimized.

benittes commented Apr 17, 2018

This bug still exists in 3.3.4


This comment has been minimized.

ThomPatterson commented Apr 20, 2018

I'm seeing this bug in 3.4.0 beta 02 as well.


This comment has been minimized.

jhb commented Apr 26, 2018

The bug still exists in 3.3.5 community. If there is no time to fix the bug, maybe it could be mentioned in the documentation?


This comment has been minimized.

micuncang commented Oct 29, 2018

The bug still exists in 3.4.7 community. VERY Confusing

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