Skip to content

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

@gongweibao gongweibao Aug 29, 2017

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.

2 participants