Skip to content
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

Fixdownloadbug #363

Merged
merged 25 commits into from
Aug 31, 2017
Merged

Fixdownloadbug #363

merged 25 commits into from
Aug 31, 2017

Conversation

gongweibao
Copy link
Collaborator

@gongweibao gongweibao commented Aug 28, 2017

Fix #364

c = NewChunk(m1.Size)
c.Len = m1.Size
c.Offset = m1.Offset
n, err := io.ReadFull(part, c.Data)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bug主要在这里。
Read读数据其实读不完也会返回。

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

一个multipart作为一个chunk?这样是否和上传时每个chunk的大小有区别呢?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

没啥区别。multipart只不过是用boundary分割的一段buffer而已。

}
log.V(2).Infof("remote chunk is same as local chunk:%s\n\n", c.String())
if errc == io.EOF || errm == io.EOF {
offset += sm.Len
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个之前的offset也有问题。

Copy link
Collaborator

@typhoonzero typhoonzero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM++

@gongweibao gongweibao merged commit c2682ee into PaddlePaddle:develop Aug 31, 2017
@gongweibao gongweibao deleted the fixdownloadbug branch August 31, 2017 02:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants