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

Update Graph.update_from_editable_future_graph to more performantly delete superflous nodegroups #11610

Closed
chrabyrd opened this issue Nov 8, 2024 · 1 comment

Comments

@chrabyrd
Copy link
Contributor

chrabyrd commented Nov 8, 2024

This block has been added near the bottom of the function:

            with connection.cursor() as cursor:
                cursor.execute(
                    """
                    DELETE FROM node_groups
                    WHERE NOT EXISTS (
                        SELECT 1 FROM nodes WHERE nodes.nodeid = node_groups.nodegroupid
                    );
                    """
                )

It iterates the entire node_groups table and deletes "orphaned" NodeGroups -- that is, NodeGroups without a Node

This is a temporary fix, and should be replaced with a solution that only deletes NodeGroups that are related to either the source_graph or editable_future_graph.

@chrabyrd
Copy link
Contributor Author

resolved in latest

@github-project-automation github-project-automation bot moved this to ✅ Done in pipeline Nov 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

1 participant