Repository navigation
Give Instagram connector deletes the long cascade-delete timeout - #1641
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Deleting an Instagram connector runs two statements in one Prisma transaction: the tool-call log delete (added by #1630 for the Meta Platform Terms) and the connector delete, which cascades into tools, graph nodes and edges. On 11-11 at 16:17 UTC one such delete took 5,977 ms, Prisma rolled it back at its default 5 s timeout and the user got a 500 (Sentry ANYTHINGMCP-CLOUD-BACKEND-4).
#1639 removed the main cost (kg_edges had no index on its node columns). A connector with many log rows can still pass 5 s on the log delete alone, so this transaction now uses
CASCADE_DELETE_TRANSACTION(60 s), as account and workspace deletes already do.Changes
ConnectorsService.remove(): passCASCADE_DELETE_TRANSACTIONto the Instagram$transaction([...]).Type
Testing
npx jest src/connectors/connectors.service.remove.spec.tsinpackages/backend: 3/3 passed. Full lint, typecheck and tests run in CI.Cloud and self-hosted behave the same: only the timeout of this one delete changes. No schema change, nothing in
ee/.Checklist
npm test) (CI)Related Issues
Relates to #1638 and #1630.