| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 7ab25aba-ea5b-4c16-b264-4d18cdedd3d1 📥 CommitsReviewing files that changed from the base of the PR and between 387472a and b7868ec. 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review. WalkthroughzoektSearch now awaits the gRPC request and response transformation, then closes the client in a finally block. Tests cover successful searches, request failures, and transformation failures. The changelog records the fix. ChangesZoekt search cleanup
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to b7868 This localized change closes unary search clients across success and failure paths with regression coverage; no actionable merge-blocking risk remains beyond normal checks and review. 🚥 Pre-merge checks | ✅ 5 ✅ Passed checks (5 passed)
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. ❤️ ShareComment @coderabbitai help to get the list of available commands. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Summary
Finding
zoektSearch created a new grpc-js WebserverService client for every unary request but never closed it. grpc-js registers each InternalChannel in its process-global channelz registry and only unregisters it when Client.close() runs, so dropping JavaScript references does not make those channels collectible.
With the repository pinned grpc-js 1.14.4, a forced-GC reproduction created and dropped 20,000 clients. Channelz still reported all 20,000 channels afterward; retained V8 heap grew by 36,170,288 bytes (about 1.81 KiB per call) and RSS grew by 318 MiB. This path is used by unary search, code navigation, and search-backed tools. Live counters show it is not the dominant source of the current browse-crawler incident, but it is a concrete traffic-proportional leak.
Remediation
The unary call and response transformation now run inside try/finally, and the client is closed in finally. This guarantees channelz cleanup after a successful response, an RPC error, a synchronous call failure, or a later database/response transformation error.
Test plan
Note
Medium Risk
Touches the unary Zoekt search path used by search, code nav, and tools. The change is small and covered by tests, but incorrect client teardown could leak or fail searches.
Overview
Stops unary Zoekt searches from leaking a grpc-js channel on every request. zoektSearch now awaits the RPC and response transform in try/finally and always calls client.close().
Streaming search already closed clients; this only fixes the unary path. Tests cover success, RPC failure, and post-response transform failure. Changelog notes the leak fix.
Reviewed by Cursor Bugbot for commit b7868ec. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit
Bug Fixes
Documentation
Tests