merge large file patch from Andy La Foe
commitb0b702171b01e391d9fe29eb4374d971c2f5bc83
authorEric Wong <normalperson@yhbt.net>
Wed, 3 Sep 2008 22:05:56 +0000 (3 15:05 -0700)
committerEric Wong <normalperson@yhbt.net>
Tue, 9 Sep 2008 01:59:19 +0000 (8 18:59 -0700)
treea283154e29b25e0ea230bd95a9aafd8471c41bac
parent2c1c7312f96fd2688366c5637e749c668c0dceb7
merge large file patch from Andy La Foe

Merging involved "Content-length" => "Content-Length"
capitalizing 'L' as per p4#3627 (aka SVN r433)

Ref: http://rubyforge.org/tracker/index.php?func=detail&aid=13764&group_id=1513&atid=5923
> Submitted By: Andy Lo-A-Foe (arloafoe)
> Category: mogilefs-client
> Summary:
> Store very large files (> 256M) without running out of memory in store_file
>
> Detailed description
>
> This is a patch to the MogileFS::store_file mechanism in order to
> support very large filee stores using HTTPFile. We sometimes have to
> store files of up to 1GB in size. Using chunking is not really an option
> since it has proven to be very unreliable (mogtool) and there is no
> support for it in the current version of this client. This patch
> basically reads 16M chunks at a time and writes them to the tracker
> socket instead of trying to stuff the while file in the StringIO and
> running out of memory. It's probably very rough and the get_file_data
> symmetry patch is not there yet. Feedback appreciated.
lib/mogilefs/httpfile.rb
lib/mogilefs/mogilefs.rb