about summary refs log tree commit homepage
DateCommit message (Collapse)
2012-02-28Ruby mogilefs-client 3.1.1 v3.1.1
This releases fixes problems short reads when slurping files into memory. Thanks to Matthew Draper for this fix. There are also minor documentation updates.
2012-02-28doc: update to not refer to MogileFS 2.55 specifically
It's more future-proof, this way.
2012-02-28LICENSE: update copyright year + range
Not that it really matters given the MIT license...
2012-02-28doc: fixup mailto: links
It's better if email addresses are visible and not hidden behind links for folks that don't integrate email clients into web browsers.
2012-02-28Don't stop reading too early.
Leave size unchanged, so it's available for easy comparison with buf.bytesize. [ew: added test case] Acked-by: Eric Wong <normalperson@yhbt.net>
2012-02-17fix documentation of :noverify for get_paths
:noverify always defaults to _true_ (meaning verification is _off_ by default). This double negative is unfortunately a confusing part of the existing API and MogileFS protocol.
2011-12-15README: speling ficks
2011-12-15Ruby mogilefs-client 3.1.0 v3.1.0
* improved API support for uploading large files While we've always supported uploading large files, the (still-supported) existing APIs were somewhat awkward or required the file to exist on the file system. See MogileFS::NewFile for details and examples. * more informative exception messages for timed-out requests * :fail_timeout parameter, the timeout for retrying a failed tracker connection. This defaults to 5 seconds (same as previous versions where this was hard-coded. * :new_file_max_time parameter Controls the maximum of time spent creating and uploading a new file in MogileFS. This defaults to 1 hour (which matching the expiry time of a row in the MogileFS internal tempfile table). * store_file works on unlinked File/Tempfile objects * each_fid method in MogileFS::Admin fixed * stale_fid_checker example script added * mogstored_rack example split into a standalone RubyGem: http://bogomips.org/mogstored_rack/ * backend error constants are generated on const_missing, instead of when raised, making it easier to rescue exceptions we didn't explicitly enable * some internal cleanups and documentation improvements
2011-12-15docs for various timeouts in MogileFS::MogileFS.new
We have lots of timeouts :x
2011-12-15backend: rely on auto-generated exceptions in const_missing
Most of these exceptions are just too rare to be useful, and code that cares for exceptions will rescue them anyways.
2011-12-14add configurable :fail_timeout for backends
This controls the retry timeout of a failed backend
2011-12-12avoid relying on exceptions for list_keys
This will make debug output quieter.
2011-12-12simplify exist? implementation for avoiding exceptions
This adds an internal :ruby_no_raise flag to the backend to avoid exceptions.
2011-12-11net-http-persistent not required for Content-Range uploads
Performance with Content-Range uploads sucks either way, so it's not noticeably worse off on a LAN /without/ persistent connections.
2011-12-11examples/stale_fid_checker: --help + fail on older versions
each_fids was too buggy and likely to yield false positives
2011-12-11History: point users towards NEWS doc
NEWS is more common in the wider Free Software community
2011-12-11chunker: small cleanups to whitespace handling
The client-provided Content-MD5 may have leading/trailing whitespace, so we shall strip that before comparing. We also know any base64-encoded MD5 we generate will have only trailing whitespace so we can get away with the (slightly) faster and more-GC-friendly String#rstrip!
2011-12-11add :new_file_max_time parameter
This defaults to 1 hour (which matches the expiry time of a row in the MogileFS internal tempfile table).
2011-12-11misc. documentation improvements
100% RDoc coverage (not that it's an indicator of _good_ documentation, but we're getting there)
2011-12-11examples: add stale_fid_checker script
This logic may go upstream into the tracker Fsck worker itself, but until then, we can try this from the client side.
2011-12-10finalize and document improved new_file API
2011-12-10rename "Put" namespace to "NewFile"
This should make documentation easier
2011-12-10tests: speedup tests that require hitting mogstored
By pre-creating devN dirs, mogstored can create usage files sooner and we won't have to wait 10s between "df" runs.
2011-12-09new_file_common: call "noop" before "create_close"
An upload could've taken a long time, ping and try to ensure socket is valid to minimize (but not completely eliminate) the chance create_close hits a stale socket (while reading the response after writing to it) and becomes non-retryable. We treat create_close specially as its less idempotent than any other command (even other non-idempotent ones). There may be no hope of retrying the upload at all if data was streamed and calling create_close twice will hurt us...
2011-12-08pool: shutdown backend when purging
If we started a connection, make sure it's stopped and the file descriptor closed. Relying on GC to close file descriptors is unreliable with some GC implementations.
2011-12-08pool: O(1) object validity checking
Now that pools can be arbitrarily large, using an O(n) check for object validity can be expensive.
2011-12-08pool: add @purge_threshold, @purge_keep accessors
Instead of hard coding the thresholds, allow users to change accessors
2011-12-08reorganize largefile support code
Putting this into the MogileFS::Put::* namespace will make it easier to document.
2011-12-08new_file(..., :largefile => :stream) avoids chunking
This allows us to stream files with a known Content-Length into MogileFS. This can be useful for streaming an HTTP download into MogileFS without: * saving it to the filesystem * relying on chunked encoding support on the server
2011-12-08Rakefile: quiet down warnings for newer rake
2011-12-08move Manifest.txt from git to .gitignore
It is auto-generated and goes into .gitignore
2011-12-08mog: config parser cleanup
2011-12-08backend: auto-generate error constants on const_missing
This way, folks can rescue for exceptions we haven't defined, yet.
2011-12-08admin: fix off-by-one in each_fid method
list_fids was being used incorrectly :x
2011-12-08move Manifest.txt generation to Rake...
Bleh, I have revision control to tell me what's there, no need to maintain this file (or even manually generate it) myself
2011-12-08store_file works on unlinked Tempfile objects
Unlinking Tempfiles is good practice, so we should allow/encourage people to use unlinked Tempfiles with store_file.
2011-12-08new_file: add :largefile => :tempfile support
This is the most-compatible way to support largefiles with the new_file interface. This will unfortunately generate disk I/O, though... Also moving the "mog" util to use this with the "tee" subcommand since it already included its own private implementation of this before.
2011-12-08http_file: big_io support for unlinked open files
This makes it easier to use an unlinked Tempfile
2011-12-07add new_file :largefile => :content_range support
This is similar to the "largefile => 1" support in the Perl MogileFS::Client package. It requires net/http/persistent to avoid repeatedly setting up and tearing down a socket.
2011-12-07new_file gains a :largefile => :chunked option
This returns a new HTTPStream object that behaves like a writable IO object with the following methods: * write * print * printf * putc * puts * syswrite * << ..and also responds to IO.select (for writability)
2011-12-07test/fresh: unused variable warning fix
Might as well assert on it...
2011-12-07http_file: use lower keepalive times under Linux
TCP keepalives are inexpensive, so we can use them to monitor whether or not our connection is still alive while uploading. Remote servers make take an unpredictable amount of time to actually write out the data we've uploaded (and empty socket buffers to receive more), so it is extremely difficult to calculate an effective timeout for select() or poll().
2011-12-07test for client-side Content-MD5 callback on upload
Some applications will rely on this feature
2011-12-07Revert "http_file: disable MD5 checksums by default"
This reverts commit 11ee57e7aaa8766d13e29d3872bd78d50a3e5263. Bleh, checksums support is already off by default...
2011-12-06http_file: disable MD5 checksums by default
We won't force this onto the wire for trackers until upstream MogileFS decides to support it.
2011-12-06rely on SO_KEEPALIVE for upload timeouts
Users will be able to tweak these themselves in OS-dependent ways. It's probably better to rely on protocol-level timeouts when the HTTP server should be on a trusted network.
2011-12-06store_file/store_content: wire these up to new new_file opts
These allow us to specify Content-MD5 and checksums for use with the new and improved new_file interface without breaking existing apps.
2011-12-06new_file: backwards compatibility for old args
2011-12-06mog: "stat" shows checksum if it is available
Checksums are good, yes they are.
2011-12-06http_file: remove unused attrs
No need to clutter ourselves up with things we don't need.