Close gRPC channels and HTTP clients in batch uploaders#1182
Close gRPC channels and HTTP clients in batch uploaders#1182joaquinhuigomez wants to merge 1 commit intoqdrant:masterfrom
Conversation
When using parallel > 1, each worker creates its own gRPC channel or HTTP client that was never cleaned up after the upload loop completed. Wrap the upload loops in try/finally to ensure channels and clients are closed, preventing file descriptor leaks. Fixes qdrant#1172
❌ Deploy Preview for poetic-froyo-8baba7 failed.
|
|
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 (2)
📝 WalkthroughWalkthroughThe pull request adds resource cleanup to two batch uploader classes to prevent connection leaks. In Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Summary
Each parallel worker in
GrpcBatchUploaderandRestBatchUploadercreates its own gRPC channel or HTTP client. These were never closed after the upload loop finished, leaking file descriptors. Wrapping the upload loops intry/finallyensures cleanup happens both on normal completion and on error.Fixes #1172