Skip to content

Fix: Set gRPC reconnection backoff to prevent indefinite hangs#1184

Open
RickyMoon800 wants to merge 1 commit intoqdrant:masterfrom
RickyMoon800:fix/grpc-hang-with-exponential-backoff
Open

Fix: Set gRPC reconnection backoff to prevent indefinite hangs#1184
RickyMoon800 wants to merge 1 commit intoqdrant:masterfrom
RickyMoon800:fix/grpc-hang-with-exponential-backoff

Conversation

@RickyMoon800
Copy link
Copy Markdown

Problem

In certain network environments (e.g., high-concurrency batch updates), the Python client could hang indefinitely if the connection dropped mid-stream due to default gRPC settings.

Solution

This PR updates parse_channel_options to include standard gRPC reconnection backoff parameters (grpc.initial_reconnect_backoff_ms and grpc.max_reconnect_backoff_ms). This ensures the client follows an exponential backoff strategy instead of hanging or retrying immediately in a tight loop.

Impact

  • Improves stability for long-running batch operations.
  • Zero breaking changes to public API.

Bounty Address (USDT-TRC20): TPCeXK1ziCgwZM8JgypZzdKxBemV7Q2TJn

@netlify
Copy link
Copy Markdown

netlify bot commented Mar 31, 2026

Deploy Preview for poetic-froyo-8baba7 ready!

Name Link
🔨 Latest commit 523c6e6
🔍 Latest deploy log https://app.netlify.com/projects/poetic-froyo-8baba7/deploys/69cbd1daf4f2d80008c07694
😎 Deploy Preview https://deploy-preview-1184--poetic-froyo-8baba7.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 31, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6faa5001-d9fc-41f1-9ae8-f0be89b36929

📥 Commits

Reviewing files that changed from the base of the PR and between cd5eb25 and 523c6e6.

📒 Files selected for processing (1)
  • qdrant_client/connection.py

📝 Walkthrough

Walkthrough

The parse_channel_options() function in qdrant_client/connection.py has been updated to include three additional gRPC client channel configuration entries in its default_options dictionary: grpc.enable_retries set to 1, grpc.initial_reconnect_backoff_ms set to 1000, and grpc.max_reconnect_backoff_ms set to 30000. These new defaults apply when no user-supplied values override them. No public function signatures or exported entities were modified.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title directly and clearly describes the main change: setting gRPC reconnection backoff to prevent indefinite hangs, which is exactly what the PR accomplishes.
Description check ✅ Passed The description provides relevant context about the problem, solution, and impact, all of which directly relate to the changeset of updating gRPC channel options.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant