Skip to content

feat(storage): Make TCP user timeout configurable - #682

Merged
jan-auer merged 1 commit into
mainfrom
feat/tcp-user-timeout
Oct 14, 2026
Merged

jan-auer merged 1 commit into
mainfrom
feat/tcp-user-timeout

Conversation

@jan-auer

@jan-auer jan-auer commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

Expose tcp_user_timeout on GCS and S3-compatible backend configs, including tiered storage's long_term, so operators can tune how long TCP writes may stall. Preserve the current 30s default.

The setting accepts human-readable durations through YAML or OS__STORAGE__TCP_USER_TIMEOUT (OS__STORAGE__LONG_TERM__TCP_USER_TIMEOUT for tiered storage). It is applied on Linux and ignored on other platforms. It detects stalled TCP writes, rather than limiting total upload duration or response time.

Ref INC-2579

@codecov

codecov Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.35%. Comparing base (81dbdc8) to head (11ba596).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #682      +/-   ##
==========================================
+ Coverage   91.33%   91.35%   +0.01%     
==========================================
  Files         117      117              
  Lines       24171    24185      +14     
==========================================
+ Hits        22077    22093      +16     
+ Misses       2094     2092       -2     
Components Coverage Δ
Rust Backend 94.83% <100.00%> (+<0.01%) ⬆️
Rust Client 81.70% <ø> (ø)
Python Client 93.81% <ø> (ø)

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.


/// Matches reqwest's default TCP user timeout on supported platforms.
pub(super) fn default_tcp_user_timeout() -> Duration {
Duration::from_secs(30)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In a follow-up, we can consider to lower the timeout to 5-10s.

@jan-auer
jan-auer marked this pull request as ready for review October 13, 2026 10:52
@jan-auer
jan-auer requested a review from a team as a code owner October 13, 2026 10:52
@linear-code

linear-code Bot commented Oct 13, 2026

Copy link
Copy Markdown

INC-2579

Comment on lines +617 to +620
#[cfg(target_os = "linux")]
let builder = builder.tcp_user_timeout(tcp_user_timeout);
#[cfg(not(target_os = "linux"))]
let _ = tcp_user_timeout;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only linux? but what if we want to run objectstore on android!!!

@jan-auer
jan-auer merged commit 5fe3e14 into main Oct 14, 2026
25 checks passed
@jan-auer
jan-auer deleted the feat/tcp-user-timeout branch October 14, 2026 15:07
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.

2 participants