Jaseci-Labs / jaseci

The Official Jaseci Code Repository
https://jaseci.org
153 stars 207 forks source link

[Bug] Deleting a Node Only Removes Reference, Leaving Node in Graph #1305

Open Thamirawaran opened 1 week ago

Thamirawaran commented 1 week ago

Describe the bug

Deleting edge node_1 del--> node_2; It works. It removes the edge. Therefore, node still exits. That's correct behavior.

Deleting node del node_1 it removes the reference (pointer) from the variable node_1 to the actual node in memory. Therefore, still node is connected to the graph. You can also confirm this with dot visualization. But there is no reference for that node.

image

To Reproduce

When we delete a node, it only deletes reference/pointer. It doesn't remove that node from the graph. Therefore, we have to make changes to fix this bug.

ChrisIsKing commented 4 days ago

Making a note here that a possible fix for the delete node is the reintroduction of the destroy keyword from jac 1.