-
Notifications
You must be signed in to change notification settings - Fork 149
Bugfix/resumbleupload #42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
if ((i + 1) * BLOCKSIZE > fsize) | ||
readLen = (int)(fsize - i * BLOCKSIZE); | ||
if ((long)(i + 1) * BLOCKSIZE > fsize) | ||
readLen = (int)(fsize - (long)i * BLOCKSIZE); | ||
byte[] byteBuf = new byte[readLen]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个 byteBuf 不用每次都 new 出来,应该提到 for 循环以外
@@ -96,27 +98,15 @@ public CallRet PutFile(string upToken, string localFile, string key) | |||
fsize = fs.Length; | |||
chunks = fsize / extra.chunkSize + 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
chunks 的计算结果并不正确
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
直接取消 chunk 概念,用 block_cnt 吧。
@@ -21,14 +22,6 @@ public class ResumablePut | |||
private const int blockMashk = (1 << blockBits) - 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个为何不用blockMashk = BLOCKSIZE-1 清晰明了
LGTM, blockMashk = BLOCKSIZE-1 in next pr |
http://pm.qbox.me/redmine/issues/7116
简化断点续上传,删除bput逻辑
修复bug:>2.5GB文件上传失败