Comments (4)
补充下:
通过“OSS控制台客户端(Windows)”下载完成后的文件和用SDK下载出现 i/o timeout后的已经下载的文件对比发现,大小是一样的,用2进制比较工具比较,内容也是一样的。
怀疑:实际文件大小和通过接口获取的不一致,通过接口获取的文件大小大
from aliyun-oss-go-sdk.
有时候,出现“unexpected EOF”,只要出现了错误,协程不退出,导致文件被占用,下载最新版本sdk,说是解决了协程不退出问题,试了,问题依旧啊,没有解决啊!
from aliyun-oss-go-sdk.
read ... i/o timeout 是网络超时,分片下载出错后,下载的文件是无效,这点需要优化。请问什么情况下出现 unexpected EOF ?
from aliyun-oss-go-sdk.
这么久了,总算有个回复的了。不过我也是只能“呵呵”了,最终还是都得靠自己啊。自己修改代码,解决了。
1、协程不退出,使用sync.WaitGroup解决,错误代码:
for completed < len(parts) {
.............................
select {
case <-results:
completed++
ps[part.Index] = part
case err = <-failed:
close(die)
return err
}
2、unexpected EOF ,出错代码
_, err = fd.Seek(part.Start, os.SEEK_SET)
if err != nil {
failed <- err
break
}
_, err = io.Copy(fd, rd)
if err != nil {
failed <- err
break
}
解决方式,可参照AWS SDK的实现方式和思路
from aliyun-oss-go-sdk.
Related Issues (20)
- listbucket 传入region无效
- 使用oss.SetHeader设置header有一定概率会无效。 HOT 1
- SignURL 应将 expiration 参数开放 HOT 1
- 使用进度条时,event.TotalBytes 总是为 0
- oss下载签名地址过期时间无效(偶现)
- Why calcFileMD5() return empty string
- 生成文件下载地址时,object如果是在目录中的,会导致找不到文件
- `downloadWorker`未处理`fd.Close()`的出错,导致可能丢数据
- 使用-buildmode="-H windowsgui"时会弹三个窗口
- oss 为啥下载不了了啊 HOT 1
- bucket.DeleteObject(objectName) 方法
- 分片上传 EL-TAG返回的问题
- 分片上传EL tag的返回问题
- putobejct可以并发吗
- 生成签名URL然后通过签名URL上传文件,Content-Type 不应该参与Signature 校验 HOT 2
- Retrytimes does not seem to use
- 大文件上传或下载时,如何暂停或者停止下载?
- V3 version HOT 5
- Got SignatureDoesNotMatch on Presigned URL with custom domain
- ContentLength选项不生效 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aliyun-oss-go-sdk.