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

Fix mg_graph for the usage under ANALYTICAL mode #220

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

gitbuda
Copy link
Member

@gitbuda gitbuda commented May 23, 2023

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 memgraph/memgraph#771 because it will improve the thrown error messages which are not very useful at the moment.

Insired by

TODOs

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 gitbuda added the type: bug Something isn't working label May 23, 2023
@gitbuda gitbuda self-assigned this May 23, 2023
@gitbuda
Copy link
Member Author

gitbuda commented Jun 14, 2023

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

Comment on lines +35 to +50
class Lang(Enum):
PYTHON = "Python"
CPP = "Cpp"
RUST = "Rust"

@staticmethod
def from_str(lang_str):
if lang_str.lower() == "python":
return Lang.PYTHON
elif lang_str.lower() == "cpp":
return Lang.CPP
elif lang_str.lower() == "rust":
return Lang.RUST
else:
raise BaseException("Wrong value for the lang parameter.")

Copy link
Contributor

Choose a reason for hiding this comment

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

This is part of different PR, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, this is just merged here to make use of it, but in the end this won't be part of this PR

Copy link
Member Author

Choose a reason for hiding this comment

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

here #226

Comment on lines +148 to +149
// TODO(gitbuda): GetWeight fails in the ANALYTICAL, according to the current usage it's ok to return 0, but it
// would be probably be better to return optional.
Copy link
Contributor

Choose a reason for hiding this comment

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

In community_detection_online it seems to me there is Update function which should propagate changes to graph. I will have a sync with @antepusic to check what is happening on Monday and to have sync about the return value.

Copy link
Contributor

@antoniofilipovic antoniofilipovic Jun 20, 2023

Choose a reason for hiding this comment

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

@gitbuda I am waiting @antepusic to return and when we sync we will update you here

Copy link

sonarcloud bot commented Nov 28, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature feature type: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants