Skip to content

fix(rdma): preserve transfer diagnostics and payload lengths - #409

Open
GatewayJ wants to merge 1 commit into
rustfs:mainfrom
GatewayJ:fix/rdma-review-feedback
Open

GatewayJ wants to merge 1 commit into
rustfs:mainfrom
GatewayJ:fix/rdma-review-feedback

Conversation

@GatewayJ

@GatewayJ GatewayJ commented Nov 3, 2026

Copy link
Copy Markdown
Member

Summary

Address the two review comments on #391: transfer error diagnostics and single-part upload lengths.

Include the redacted source in transfer error displays so post-write verification and multipart completion failures retain their actionable cause. Preserve the typed outcome, exit code, error source, and retry behavior.

Derive single-part upload lengths from the bytes read from the file. Use that length for the external request, returned object size, and progress reports, including HTTP fallback. Remove the stale metadata-length argument from the private single-part helper.

Regression tests cover optional error sources, credential and SSE-C redaction, post-write and multipart diagnostics, and upload payloads and progress when files grow, shrink, or become empty before reading.

Verification

Validated on Rust 1.99.0 against main at 78f6c910e68e23fa6c6e430e1c89faeb2a130ff9:

  • The new assertions reproduced the missing diagnostic and incorrect payload-length behavior before the fixes.
  • Focused transport checks: 22 tests passed.
  • CARGO_BUILD_JOBS=8 make -j8 pre-commit: formatting, all-target workspace Clippy with -D warnings, and 1,991 tests passed; 2 existing tests ignored.
  • cargo test --package rustfs-cli --test golden --features golden -j8: 5 passed.
  • git diff --check passed.

Compatibility and review

  • Correctness: declared payload lengths and object sizes match the actual uploaded bytes.
  • Security: displayed sources retain credential and SSE-C filtering, with assertions covering plain and encoded key material.
  • Compatibility: source-free error text, exit codes, transport selection, and retry classification are preserved. The changed upload helper is private.
  • Test coverage: both RDMA and pre-admission HTTP fallback are exercised without a physical RDMA device.
  • Simplicity and performance: lengths come directly from the existing buffer, and source formatting runs only when displaying an error.

The private transport dependency is unchanged. Physical RDMA and the optional native executable were not tested for this change.

Rollback: revert this commit; no configuration or data migration is required.

Copilot AI left a comment

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.

🟢 Approval recommended

No active review issues were identified for the RDMA diagnostic and single-part upload length changes.

No open issues 🎉

What changed in this PR

Fixes two follow-up issues from #391 in the optional RDMA transfer integration: missing error causes and stale single-part upload lengths.

Changes:

  • Includes optional source errors in transfer diagnostics while preserving outcome classification and retry behavior.
  • Uses actual buffered payload lengths for single-part uploads, returned sizes, and progress, including HTTP fallback.
  • Adds regression coverage for changing file contents, diagnostic preservation, and credential/SSE-C redaction.
File Description
crates/​s3/​src/​client.rs Corrects upload lengths and progress; tests payload changes, fallback, and redacted diagnostics.
crates/​core/​src/​error.rs Includes optional source details in transfer error displays.
crates/​core/​src/​data_transport.rs Tests error display formatting and preserved outcome behavior.

Review effort: Balanced

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