Replies: 2 comments
-
@achantavy to make this very specific, the following changes would be necessary in
Obviously, the question is whether making these changes can cause any trouble. From a quick search through the codebase, I do see other calls to |
Beta Was this translation helpful? Give feedback.
-
I think we do need the call to consume in line 121 though because it maintains state. That loop is intended for cleanup jobs: it deletes Other calls to consume are probably removable though - will experiment. |
Beta Was this translation helpful? Give feedback.
-
@danielsaporo brought up that Neo4j client 5.x is required for use with Memgraph and calling
consume()
makes the transaction "out of scope" and throws an exception when you call it a second time. We callconsume()
multiple times in https://github.com/lyft/cartography/blob/48f50caed6ac889225e94611b1315f6a95c19470/cartography/graph/statement.py#L126 and in other places throughout the code.The original intent of
consume()
was to fix #170. Now that write transactions (which include auto retries) are more prevalent in the code, I'm not sure if we still need consume().We should validate whether this call to consume() is actually needed by removing it throughout the code and stress testing it with a real sync.
Beta Was this translation helpful? Give feedback.
All reactions