Skip to content
This repository has been archived by the owner on Nov 20, 2018. It is now read-only.

EnableRewind causes data loss on files larger than the buffer threshold #605

Closed
DavidObando opened this issue Mar 31, 2016 · 5 comments
Closed
Assignees
Milestone

Comments

@DavidObando
Copy link
Member

Multipart posts containing files larger than the default buffering threshold (currently 30 KB) used by EnableRewind will result in data loss.

The data loss I've seen is usually at the beginning of the file, and usually around 28 KB long. For example, uploading a file that on the client side is 100 KB, the server will save ~72.3 KB on a file. As a proof of concept, when I enlarged the buffering threshold to 200 KB the server was able to save the entire 100 KB file. The solution of course isn't to enlarge the buffer threshold but to make it so we don't lose the bits from the first buffer frame, as we apparently are.

A self-contained repro can be found at: https://github.com/DavidObando/BugRepros/tree/master/2016-03-31/EnableRewindBug. The repro will save the client-side file and the server-side file in C:\Temp\ for easy comparison.

@DavidObando
Copy link
Member Author

/cc: @yuwaMSFT @sivagms

@davidfowl
Copy link
Member

/cc @Tratcher

@Tratcher
Copy link
Member

Tratcher commented Apr 1, 2016

Hmm, there was a perf change in this code last week, I wonder if it regressed something...
bd60507#diff-6bee66e850efacd8fe96daae334fa1c5R195

@Tratcher Tratcher self-assigned this Apr 1, 2016
@Tratcher Tratcher added this to the 1.0.0-rc2 milestone Apr 1, 2016
@davidfowl
Copy link
Member

Revert it and test.

@Tratcher
Copy link
Member

Tratcher commented Apr 1, 2016

Yes, that was it. I'll send a PR after I add some tests.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants