-
Notifications
You must be signed in to change notification settings - Fork 20
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
[Httpclient] fix pointer position of mmap object in the case of failure #118
[Httpclient] fix pointer position of mmap object in the case of failure #118
Conversation
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.
Nice! Let's add a test.
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.
👏🏼
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.
.
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.
Great! Only have a few minor comments for consideration.
ML-5926
When using an mmap object, this bug might occur:
If the first connection fails, the pointer still moves at the first attempt by the first connection's block size. After it fails, we try to create another connection and send data, but not from the beginning of the file.
This is why we might miss some bytes at the beginning of the file.
This PR solves the issue and explains it with comments.