about summary refs log tree commit homepage
DateCommit message (Collapse)
2012-06-15Ruby mogilefs-client 3.2.0-rc1 v3.2.0-rc1
* "list_keys" and "exist?" client commands raise errors properly on failure. * backend connections no longer terminate on ERR responses, only on socket/connection errors. * support the "updateclass" client command. This is for updating the class of a given key and not to be confused with the "update_class" admin command. * "new_file" checksum usage is now documented since MogileFS 2.60 includes official support for checksums
2012-06-12backend: reuse connections on error responses
The server sending us a properly-formed "ERR" response is a big difference than an actual socket or connection error.
2012-06-06exist?(dkey) raises on real errors
Specifying an invalid domain will raise MogileFS::Backend::UnregDomain error instead of merely returning `false'. Only checks for keys in the correct domain (but non-existent keys) return false.
2012-06-05list_keys raises on errors properly
list_keys needs to raise UnregDomainError on invalid domains. This regression was introduced in commit 0b933fc83b8b519c8e587caa6606dd372dda18af
2012-05-08Rakefile: remove vim-specific modeline
Avoid taking sides or showing preference for particular text editors. Text editors are _very_ personal preferences, and explicitly supporting/acknowledging one would set precedence for explicitly supporting/acknowledging others. This would lead down the slippery slope of having modelines for every single text editor in every single file we have. For this same reason, we do not (and never will) expose editor-specific suffixes in .gitignore. Full disclosure: I'm a vim user myself
2012-05-04new_file: documentation for :content_md5 usage
Now that checksum support is officially a part of MogileFS, we can document (and thus encourage) it without risking compatibility issues.
2012-03-22client: add support for "updateclass" command
This changes the class associated with +key+. This is _not_ the same as the "update_class" admin command which actually modifies the class itself.
2012-02-28Rakefile: release generated NEWS/ChangeLog files
These files should be included in release gem/tarballs, users should not require web acccess to access documentation.
2012-02-28README: add download link
Not everybody uses RubyGems.
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...