Skip to content

Fix memory leak from orphaned invocations on deployment deletion - #127

Open
Chandraveersingh1717 wants to merge 1 commit into
metacall:masterfrom
Chandraveersingh1717:fix/memory-leak-orphaned-invocations
Open

Fix memory leak from orphaned invocations on deployment deletion#127
Chandraveersingh1717 wants to merge 1 commit into
metacall:masterfrom
Chandraveersingh1717:fix/memory-leak-orphaned-invocations

Conversation

@Chandraveersingh1717

Copy link
Copy Markdown

Problem

When a deployment is deleted, pending invocations in the global queue are not cleaned up. This causes:

  • Memory leak as orphaned invocations remain in the queue indefinitely
  • Potential crashes when workers try to resolve invocations from deleted deployments

Solution

  • Track deployment ownership by adding suffix field to invocations
  • Clean up deployment-specific invocations before killing worker process
  • Handle race conditions with safe null checks

Testing

  • All existing tests pass
  • No ESLint errors or warnings

@viferga

viferga commented Aug 3, 2026

Copy link
Copy Markdown
Member

This looks good but I need tests for verifying it works, first push the tests, then we run the CI verifying it fails, then you push the changes and we verify it works.

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

Successfully merging this pull request may close these issues.

2 participants