-
Notifications
You must be signed in to change notification settings - Fork 276
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
WIP: Rel concurrency issue proving test cases #1704
Conversation
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #1704 +/- ##
===========================================
- Coverage 93.43% 43.23% -50.20%
===========================================
Files 128 106 -22
Lines 5909 4947 -962
===========================================
- Hits 5521 2139 -3382
- Misses 388 2808 +2420 ☔ View full report in Codecov by Sentry. |
|
||
# to_node.from_class only returns 1 result but in db there are two rels associated with this node | ||
# this assertion fails with with result 2 proving the presence of bug | ||
expect(ActiveGraph::Base.query("MATCH (node2:`ToClass`)<-[rel1:`HAS_REL`]-(from_class:`FromClass`) return from_class").to_a.size).to eq(1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
# to_node.from_class only returns 1 result but in db there are two rels associated with this node | ||
# this assertion fails with with result 2 proving the presence of bug | ||
expect(ActiveGraph::Base.query("MATCH (node2:`ToClass`)<-[rel1:`HAS_REL`]-(from_class:`FromClass`) return from_class").to_a.size).to eq(1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Closing as the fix for this is merged. |
Bug: When a has_one association of a node is updated concurrently, it does not respect the
has_one
association and due to race condition it may result in wrong data. This is very low probable scenario.