Skip to content

Commit 0e5ce2e

Browse files
committed
fix http concurrency
Add tests
1 parent 0a857fa commit 0e5ce2e

File tree

3 files changed

+405
-200
lines changed

3 files changed

+405
-200
lines changed

sdk/src/Services/S3/Custom/Transfer/Internal/FilePartDataHandler.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public async Task ProcessPartAsync(
9090
partNumber, offset);
9191

9292
// Write part data to file at the calculated offset
93-
await WritePartToFileAsync(offset, response, cancellationToken)
93+
await WritePartToFileAsync(partNumber, offset, response, cancellationToken)
9494
.ConfigureAwait(false);
9595

9696
_logger.DebugFormat("FilePartDataHandler: [Part {0}] File write completed successfully",
@@ -192,6 +192,7 @@ private long GetPartOffset(GetObjectResponse response, int partNumber)
192192
/// Writes part data from GetObjectResponse ResponseStream to the file at the specified offset.
193193
/// </summary>
194194
private async Task WritePartToFileAsync(
195+
int partNumber,
195196
long offset,
196197
GetObjectResponse response,
197198
CancellationToken cancellationToken)
@@ -232,7 +233,7 @@ await response.WriteResponseStreamAsync(
232233
await fileStream.FlushAsync(cancellationToken)
233234
.ConfigureAwait(false);
234235

235-
_logger.DebugFormat("FilePartDataHandler: Successfully wrote {0} bytes at offset {1}",
236+
_logger.DebugFormat("FilePartDataHandler: [Part {0}] Successfully wrote {0} bytes at offset {1}", partNumber,
236237
response.ContentLength, offset);
237238
}
238239
}

0 commit comments

Comments
 (0)