Skip to content

feat(sdk): support per-request timeout to TCP/QUIC/WebSocket clients#3429

Open
chengxilo wants to merge 10 commits into
apache:masterfrom
chengxilo:client-timeout
Open

feat(sdk): support per-request timeout to TCP/QUIC/WebSocket clients#3429
chengxilo wants to merge 10 commits into
apache:masterfrom
chengxilo:client-timeout

Conversation

@chengxilo

@chengxilo chengxilo commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR address?

Closes #3419

Rationale

Clients had no deadline on individual request, so a stalled server could block a caller forever.

What changed?

send_raw would be blocked forever if server doesn't response. I added a request_timeout field (IggyDuration, default 300s) to TcpClientConfig, QuicClientConfig, and WebSocketClientConfig. Each client's send_raw now wraps its I/O in tokio::time::timeout

Local Execution

  • Passed
  • Pre-commit hooks ran

AI Usage

  1. Claude Opus 4.6
  2. implementation
  3. manually reviewed
  4. Yes

Change Log

By default, Iggy Rust SDK would have a 30s timeout for each request.

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown

Thanks for the PR. It is labeled S-waiting-on-review and queued for review.

Slash commands (own line, regular comment) move it around the queue:

  • /ready - back to S-waiting-on-review after addressing feedback
  • /author - flip to S-waiting-on-author while you finish changes
  • /request-review @user-or-team - request a reviewer

See CONTRIBUTING.md for details.

@github-actions github-actions Bot added the S-waiting-on-review PR is waiting on a reviewer label Jun 6, 2026
@codecov

codecov Bot commented Jun 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 71.28028% with 83 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.26%. Comparing base (4a48008) to head (06588b9).

Files with missing lines Patch % Lines
core/sdk/src/quic/quic_client.rs 57.89% 13 Missing and 3 partials ⚠️
core/sdk/src/websocket/websocket_client.rs 75.00% 10 Missing and 5 partials ⚠️
core/sdk/src/tcp/tcp_client.rs 77.41% 7 Missing and 7 partials ⚠️
core/sdk/src/client_provider.rs 65.78% 5 Missing and 8 partials ⚠️
core/sdk/src/clients/client_builder.rs 0.00% 12 Missing ⚠️
...tion/quic_config/quic_connection_string_options.rs 69.23% 2 Missing and 2 partials ⚠️
...ration/tcp_config/tcp_connection_string_options.rs 69.23% 2 Missing and 2 partials ⚠️
core/common/src/types/args/mod.rs 25.00% 1 Missing and 2 partials ⚠️
...cket_config/websocket_connection_string_options.rs 71.42% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3429      +/-   ##
============================================
- Coverage     74.27%   72.26%   -2.02%     
  Complexity      937      937              
============================================
  Files          1259     1259              
  Lines        125969   121376    -4593     
  Branches     101644    97093    -4551     
============================================
- Hits          93558    87707    -5851     
- Misses        29396    30385     +989     
- Partials       3015     3284     +269     
Components Coverage Δ
Rust Core 72.71% <71.28%> (-2.45%) ⬇️
Java SDK 58.57% <ø> (ø)
C# SDK 71.43% <ø> (-0.68%) ⬇️
Python SDK 88.88% <ø> (ø)
PHP SDK 84.29% <ø> (ø)
Node SDK 91.13% <ø> (-0.10%) ⬇️
Go SDK 40.36% <ø> (ø)
Files with missing lines Coverage Δ
core/common/src/error/iggy_error.rs 100.00% <ø> (ø)
...es/configuration/quic_config/quic_client_config.rs 100.00% <100.00%> (ø)
...guration/quic_config/quic_client_config_builder.rs 36.60% <100.00%> (+7.60%) ⬆️
...ypes/configuration/tcp_config/tcp_client_config.rs 100.00% <100.00%> (ø)
...figuration/tcp_config/tcp_client_config_builder.rs 71.55% <100.00%> (+3.51%) ⬆️
...ration/websocket_config/websocket_client_config.rs 62.35% <100.00%> (+0.90%) ⬆️
...ebsocket_config/websocket_client_config_builder.rs 37.96% <100.00%> (+7.75%) ⬆️
...cket_config/websocket_connection_string_options.rs 58.51% <71.42%> (+0.70%) ⬆️
core/common/src/types/args/mod.rs 45.51% <25.00%> (-0.54%) ⬇️
...tion/quic_config/quic_connection_string_options.rs 69.07% <69.23%> (+0.01%) ⬆️
... and 6 more

... and 122 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread core/common/src/types/configuration/quic_config/quic_client_config.rs Outdated
Comment thread core/sdk/src/tcp/tcp_client.rs Outdated
Comment thread core/sdk/src/websocket/websocket_client.rs Outdated
Comment thread core/sdk/src/tcp/tcp_client.rs
Comment thread core/sdk/src/quic/quic_client.rs Outdated
Comment thread core/common/src/types/configuration/tcp_config/tcp_client_config.rs Outdated
Comment thread core/sdk/src/tcp/tcp_client.rs Outdated
Comment thread core/sdk/src/client_provider.rs Outdated
Comment thread core/common/src/types/configuration/tcp_config/tcp_client_config.rs Outdated
Comment thread core/common/src/types/configuration/tcp_config/tcp_client_config.rs
@github-actions github-actions Bot added S-waiting-on-author PR is waiting on author response and removed S-waiting-on-review PR is waiting on a reviewer labels Jun 9, 2026
@chengxilo chengxilo requested a review from hubcio June 17, 2026 01:08
@chengxilo

Copy link
Copy Markdown
Contributor Author

/ready

@github-actions github-actions Bot added S-waiting-on-review PR is waiting on a reviewer and removed S-waiting-on-author PR is waiting on author response labels Jun 17, 2026
@chengxilo

Copy link
Copy Markdown
Contributor Author

/author

@chengxilo

Copy link
Copy Markdown
Contributor Author

After merging there is something need to be changed.

@github-actions github-actions Bot added S-waiting-on-author PR is waiting on author response and removed S-waiting-on-review PR is waiting on a reviewer labels Jun 21, 2026
@chengxilo

Copy link
Copy Markdown
Contributor Author

/ready

@github-actions github-actions Bot added S-waiting-on-review PR is waiting on a reviewer and removed S-waiting-on-author PR is waiting on author response labels Jun 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review PR is waiting on a reviewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support per-request timeout to TCP/QUIC/WebSocket clients

2 participants