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

deleting a cell/cells does not update the dependency graph. #206

Closed
heizusan opened this issue Feb 2, 2023 · 2 comments
Closed

deleting a cell/cells does not update the dependency graph. #206

heizusan opened this issue Feb 2, 2023 · 2 comments

Comments

@heizusan
Copy link

heizusan commented Feb 2, 2023

Verified by breakpoint and watching dgraph/qdb inside GetDGraphDB:

  1. Edit a new cell to add python reference to other cells. dgraph edgeCount reflects the old dependency count (because it has not yet been modified).
  2. Edit the cell to add or remove cell references. dgraph edgeCount reflects the correct count from the first edit (again, stale data)
  3. Delete the cell.. dgraph edgeCount reflects the count from [2] (stale data).
  4. Perform any operation that needs to get/update dgraph. dgraph edgeCount reflects [2] - NOT [3].

This is an issue in terms of a performance leak - and potentially invalid data.

  1. These stale/invalid dependency edges are a memory leak (albeit a small one).
  2. If one of the cells "referenced" in those edges is updated, it will push cells onto the update queue that do not need to be updated. Mostly this is a quick loop of no-ops on those cells - a small performance hit. However:
  3. If those cells have any non-deterministic/live computations (e.g. Random, or Date.now()), they will incorrectly be computed and updated with new values.
@davidkircos
Copy link
Collaborator

davidkircos commented Feb 2, 2023 via email

@heizusan
Copy link
Author

heizusan commented Feb 2, 2023

You're right. I was looking through the wrong branch this entire time...

@heizusan heizusan closed this as completed Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants