Uh oh!
There was an error while loading. Please reload this page.
Fix number of segments of a large object - #255
Conversation
The total number of segments was determined with round($streamSize/$segmentSize). In cases like $streamSize=24 and $segmentSize=10 this resulted in one segment too few that was uploaded. This has been fixed by simply omitting round().
47cd7d3 to
0876029CompareUh oh!
There was an error while loading. Please reload this page.
haphan
commented
Sep 14, 2018
thanks @mzur 🚀 |
ErwanGuillon
commented
Nov 27, 2018
When do you think you will tag a version for this? I'm not very confortable by using the dev branch in production and it's a blocker for me as I upload very large files. Thanks for the hard work. |
dsnopek
commented
Feb 4, 2019
Please tag a new version with this! We got bit by this bug, and 75% of our backups were corrupted. Of course, I tested one of the backups, but it was among the 25% where the last segment was greater than half the segment size so all the segments were uploaded. We lost a whole bunch of data due to this. Now we're using the latest from Git, but I'm sure this bug will cause more people to have data loss issues! |
haphan
commented
Feb 4, 2019
@dsnopek Thanks for bringing my attention to this issue. I’ve released 3.0.6 to address this. My intention was to backport this fix to 2.x branch as well before tagging. |
ErwanGuillon
commented
Feb 14, 2019
Thanks @haphan |
This fixes an off by one error with the number of segments of large objects uploaded to Swift.
The total number of segments was determined with
round($streamSize/$segmentSize). In cases like$streamSize=24and$segmentSize=10this resulted in one segment too few that was uploaded. This has been fixed by simply omittinground(). I also updated the test which did not fail before by pure chance.