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

WIP: Rel concurrency issue proving test cases #1704

Closed
wants to merge 1 commit into from

Conversation

mrhardikjoshi
Copy link
Member

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.

@codecov-commenter
Copy link

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (3c89aef) 93.43% compared to head (c307559) 43.23%.

❗ Current head c307559 differs from pull request most recent head e060bc2. Consider uploading reports for the commit e060bc2 to get more accurate results

Files Patch % Lines
...node/query/query_proxy_methods_of_mass_updating.rb 0.00% 3 Missing ⚠️

❗ 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.
📢 Have feedback on the report? Share it here.


# 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)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot of the data
Screenshot 2023-11-30 at 8 09 28 PM


# 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)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot of the data
Screenshot 2023-11-30 at 8 10 19 PM

@mrhardikjoshi
Copy link
Member Author

Closing as the fix for this is merged.

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

Successfully merging this pull request may close these issues.

2 participants