[fix] Improve stale upload slice resilience#293
Conversation
Made-with: Cursor
There was a problem hiding this comment.
Pull request overview
Improves resiliency of upload attempts when slices become “oversized” relative to the current adaptive chunk size, and makes adaptive downscaling more aggressive on client-side failures.
Changes:
- Revise upload attempt timeout computation to immediately budget more time for oversized slices based on current chunk size, with bounded retry growth.
- Downscale more aggressively after repeated client timeout/network failures by resetting parallelism to minimum and halving chunk size.
- Classify
SocketError.OperationAbortedas a client network error and add diagnostic logging for slice/chunk ratio.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/ByteSync.Client/Services/Communications/Transfers/Uploading/UploadAttemptTimeoutPolicy.cs |
Changes timeout computation to use an oversized-slice heuristic tied to current chunk size. |
src/ByteSync.Client/Services/Communications/Transfers/Uploading/FileUploadWorker.cs |
Adds debug logging for slice-to-chunk ratio to aid diagnostics. |
src/ByteSync.Client/Services/Communications/Transfers/Uploading/AdaptiveUploadController.cs |
Adds a dedicated, more aggressive downscale path for client network issues/timeouts. |
src/ByteSync.Client/Services/Communications/Transfers/Strategies/UploadFailureClassifier.cs |
Treats OperationAborted socket failures as client network errors. |
tests/ByteSync.Client.UnitTests/Services/Communications/Transfers/Uploading/UploadAttemptTimeoutPolicyTests.cs |
Updates/extends unit tests for the new timeout behavior. |
tests/ByteSync.Client.UnitTests/Services/Communications/Transfers/Uploading/AdaptiveUploadControllerTests.cs |
Updates expectations for the new client-failure downscale behavior. |
tests/ByteSync.Client.UnitTests/Services/Communications/Transfers/Strategies/UploadFailureClassifierTests.cs |
Adds coverage for OperationAborted socket classification. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Made-with: Cursor
Allow large stale upload slices to use a higher timeout ceiling without raising the normal upload retry budget. Made-with: Cursor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Centralize the transport-closure message fallback and cover the known runtime variants while keeping structured socket checks first. Made-with: Cursor
|



Summary
Test plan
UploadAttemptTimeoutPolicyTests|FullyQualifiedNameAdaptiveUploadControllerTests|FullyQualifiedName~UploadFailureClassifierTests"