Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
确实,分片下载的ProgressEvent如果要聚合有很多问题。
个人觉得,在分片下载ProgressEvent接入中,因为实现上就是分chunk并行下载,所以ProgressEvent的hook在推进度的时候符合真实的下载进度就可以了。
比如
在这个前提下,分片下载支持ProgressEvent是可行的。
我自己实现了这个部分,并在公司内部的工具中提供了这个能力(内网pod在线java dump,文件传到了cos,然后几个G走没有checkpoint下载失败过于痛苦)。觉得可以贡献出来。
相关的UT代码
https://github.com/athlum/cos-go-sdk-v5/blob/feature/multipart-download-with-progress-event/object_test.go#L1012
以下是UT记录