mirror of
https://github.com/Grace-Solutions/PSMinIO.git
synced 2026-07-26 14:58:13 +00:00
Fix multipart upload progress display by adding ProcessQueuedUpdates calls
� PROGRESS DISPLAY FIX:
✅ MISSING PROGRESS PROCESSING:
• Added ProcessQueuedUpdates() calls throughout multipart upload
• Progress was being queued but never displayed to user
• Now processes progress updates immediately after key events
� PROGRESS PROCESSING POINTS:
• After initial progress setup (Layer 1 & 2 initialization)
• After upload ID logging and configuration display
• After each part completion with updated file progress
• After final completion of all progress layers
� EXPECTED RESULTS:
• 3-layer progress bars now visible during upload
• Collection progress shows overall operation
• File progress shows parts completed with speed
• Chunk progress shows individual part upload (when implemented)
• Real-time progress updates during long operations
� TECHNICAL DETAILS:
• ThreadSafeProgressCollector queues updates from background threads
• ProcessQueuedUpdates() must be called from main thread to display
• Added strategic calls at key progress milestones
• Maintains thread safety while ensuring visibility
Now multipart uploads show proper 3-layer progress tracking!
This commit is contained in:
Binary file not shown.
@@ -62,6 +62,9 @@ namespace PSMinIO.Core.S3
|
||||
_progressCollector.QueueProgressUpdate(2, "File Upload",
|
||||
$"Uploading {fileInfo.Name} ({SizeFormatter.FormatBytes(totalSize)})", 0, 1);
|
||||
|
||||
// Process initial progress updates
|
||||
_progressCollector.ProcessQueuedUpdates();
|
||||
|
||||
var uploadId = resumeUploadId;
|
||||
var parts = new ConcurrentDictionary<int, PartInfo>();
|
||||
var operationStartTime = DateTime.UtcNow;
|
||||
@@ -94,6 +97,9 @@ namespace PSMinIO.Core.S3
|
||||
_progressCollector.QueueVerboseMessage("Upload configuration - Chunk size: {0}, Total parts: {1}, Max parallel: {2}",
|
||||
SizeFormatter.FormatBytes(effectiveChunkSize), totalParts, _maxParallelUploads);
|
||||
|
||||
// Process verbose messages and progress updates
|
||||
_progressCollector.ProcessQueuedUpdates();
|
||||
|
||||
// Upload parts in parallel
|
||||
var uploadTasks = new List<Task>();
|
||||
var semaphore = new SemaphoreSlim(_maxParallelUploads, _maxParallelUploads);
|
||||
@@ -134,6 +140,9 @@ namespace PSMinIO.Core.S3
|
||||
|
||||
_progressCollector.QueueVerboseMessage("Completed part {0}/{1} ({2})",
|
||||
partNum, totalParts, SizeFormatter.FormatBytes(partSize));
|
||||
|
||||
// Process progress updates immediately
|
||||
_progressCollector.ProcessQueuedUpdates();
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -162,6 +171,9 @@ namespace PSMinIO.Core.S3
|
||||
_progressCollector.QueueProgressCompletion(2, "File Upload", 1);
|
||||
_progressCollector.QueueProgressCompletion(1, "Multipart Upload Collection");
|
||||
|
||||
// Process final progress updates
|
||||
_progressCollector.ProcessQueuedUpdates();
|
||||
|
||||
return new MultipartUploadResult
|
||||
{
|
||||
BucketName = bucketName,
|
||||
|
||||
Reference in New Issue
Block a user