mage icon indicating copy to clipboard operation
mage copied to clipboard

Fix mg_graph for the usage under ANALYTICAL mode

Open gitbuda opened this issue 2 years ago • 2 comments

If you have a constant stream of updates + run a global algorithm like community detection + try to update all the nodes, it's very likely that there will be a serialization error in the transactional mode. On the other hand, in the analytical mode, the current error handling inside cpp/mg_utility/mg_graph.hpp is not appropriate, the throw happens for the wrong reason.

Related PR is https://github.com/memgraph/memgraph/pull/771 because it will improve the thrown error messages which are not very useful at the moment.

Insired by

  • https://github.com/memgraph/memgraph/issues/1036

TODOs

  • [ ] Check why the edge hasn't been added via trigger before the GetWeight call
  • [ ] Figure out the best API to be able to write stuff in both ANALYTICAL and TRANSACTIONAL mode
  • [ ] Refactor the code
  • [ ] Make it work with https://github.com/memgraph/memgraph/pull/771, once that RR is merged, use latest master

Recreate

  1. Import -> https://bluej.memgraph.com/dump/bluej-latest.cypherl.gz (not required, it's possible to get an error based on the empty databases and running feed)
  2. Run -> https://github.com/memgraph/bluej
  3. Execute
    CALL community_detection.get() YIELD node, community_id WITH node, community_id WHERE 'Person' IN labels(node) SET node.community_id = community_id;
    

Notes

  • It's not possible to install gensim and gekko on Ubuntu 22.04 -> some unit test fail
  • While loading torch -> if it's not installed via pip -> memgraph fails to start with free error

Reviewer checklist (the reviewer checks this part)

Module/Algorithm

  • [ ] Core algorithm/module implementation
  • [ ] Query module implementation
  • [ ] Unit tests
  • [ ] End-to-end tests
  • [ ] Code documentation
  • [ ] README short description
  • [ ] Documentation on memgraph/docs

gitbuda avatar May 23 '23 18:05 gitbuda

@antoniofilipovic & @antepusic any upfront idea on how to support this would be great 👀 🤔 😄

gitbuda avatar Jun 14 '23 13:06 gitbuda

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

sonarqubecloud[bot] avatar Nov 28 '23 20:11 sonarqubecloud[bot]