fix: LiveQuery subscriptions leak when a client reuses a subscribe requestId#10499
Conversation
|
🚀 Thanks for opening this pull request! We appreciate your effort in improving the project. Please let us know once your pull request is ready for review. Tip
Note Please respond to review comments from AI agents just like you would to comments from a human reviewer. Let the reviewer resolve their own comments, unless they have reviewed and accepted your commit, or agreed with your explanation for why the feedback was incorrect. Caution Pull requests must be written using an AI agent with human supervision. Pull requests written entirely by a human will likely be rejected, because of lower code quality, higher review effort and the higher risk of introducing bugs. Please note that AI review comments on this pull request alone do not satisfy this requirement. Our CI and AI review are safeguards, not development tools. If many issues are flagged, rethink your development approach. Invest more effort in planning and design rather than using review cycles to fix low-quality code. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThis PR fixes LiveQuery subscription leaks when clients reuse requestIds. It deduplicates requestId registrations in ChangesLiveQuery duplicate requestId handling
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 7✅ Passed checks (7 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 OpenGrep (1.22.0)OpenGrep fatal error (exit code 2): [00.13][ERROR]: Error: exception Unix_error: No such file or directory stat spec/ParseLiveQuery.spec.js Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## alpha #10499 +/- ##
==========================================
+ Coverage 92.59% 92.60% +0.01%
==========================================
Files 193 193
Lines 16928 16941 +13
Branches 234 240 +6
==========================================
+ Hits 15674 15689 +15
+ Misses 1231 1229 -2
Partials 23 23 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
## [9.9.1-alpha.8](9.9.1-alpha.7...9.9.1-alpha.8) (2026-06-10) ### Bug Fixes * LiveQuery subscriptions leak when a client reuses a subscribe requestId ([#10499](#10499)) ([3fad4fb](3fad4fb))
|
🎉 This change has been released in version 9.9.1-alpha.8 |
Issue
Parse Server LiveQuery accepts multiple
subscribeframes from the same WebSocket client that reuse a singlerequestId. The client-side subscription metadata is keyed only byrequestId, so each duplicate subscribe overwrites the previous entry while the previously created subscription remains in the server-wide subscriptions map. Disconnect cleanup only walks the surviving client metadata, so the orphaned subscriptions are never removed — they persist for the lifetime of the process, consume memory, and are evaluated on every subsequent object event for the affected class.Tasks
Summary by CodeRabbit
Bug Fixes
Tests