about summary refs log tree commit homepage
DateCommit message (Collapse)
2009-02-25mogilefs-client 2.0.1 v2.0.1
2009-02-25network: make verify_uris method more robust
IO.select can raise errors (IOError most notably) on bad descriptors. Ensure we can detect and delete them from our waiting sets if IO.select raises something.
2009-02-23Allow 'store_content' to be used with a streamable object
New way to call 'store_content' with a MogileFS::Util::StoreContent allows you to roll your own method of streaming data to mogile on an upload (instead of using a string or file) [ew: this still requires a known content length beforehand] [ew: applied with --whitespace=strip, rewritten subject, 80-column wrapping] Signed-off-by: Eric Wong <normalperson@yhbt.net>
2009-02-23fix tests
Signed-off-by: Eric Wong <normalperson@yhbt.net>
2009-02-23Add setup.rb
I'm tired of the overhead of loading rubygems
2009-02-07test: workaround some concurrency issues in tests
At least processes are easier to debug than threads...
2009-02-07backend: Allow TEST_DEAD_PORT to be set
When running tests in parallel, releasing a listener when killing the process that owns it can cause another test to grab it. Allow setting TEST_DEAD_PORT in env to avoid this race condition.
2009-02-07test_util: cleanup forked servers
Not sure why the atexit statement doesn't kick in in test/setup; but I'm too lazy to look into it at the moment. Also remove a "require 'tempfile'" while we're at it.
2009-02-07Rewrite tests to not use threads (1.9)
Kernel threads in 1.9 are excruciatingly painful to debug (much more so than userspace threads in 1.8). I'm not in a masochistic days...
2009-02-07Force binary encoding on all objects
File and StringIO objects need to be opened in binary mode, otherwise they take the default encoding format. Thankfully, Sockets and Tempfile objects seem to be binary by default as of 1.9.1; but it really is a mess to have to deal with FS abstractions that try to deal with encoding crap behind your back...
2009-02-07test_backend: 1.9 compatibility fixes
Not sure how hosts was ever allowed to be a String, but sort_by does not work on Strings in 1.9 so this was a bug before, too. Also I'm not sure how the accept_nr variable gets shared between threads; better just to use sockets for here...
2009-02-07backend: Ruby 1.9-compatible url_escape
Use String#ord instead of String#[] when it is available.
2009-02-07test/setup: don't blindly undefine default_test
the "default_test" method may not exist in the version of Ruby we're using (1.9.1p0)
2009-02-07MogileFS::Pool#use always returns nil
We don't want to return the used object back to the caller. Noticed during 1.9.1 compatibility testing.
2009-02-02mogilefs-client 2.0.0 v2.0.0
2009-02-02backend: cleanup and simplify slightly
Again, eliminate unnecessary return statements and simplify hash generation.
2009-01-28MogileFS::Mysql: refresh devices/domains on cache miss
Domains and devices may be added/changed at any time, so there's a risk of cache misses in case something got added before our cache refresh interval. Always retry if we have a cache miss.
2009-01-23GNUmakefile: add flog/flay targets
Some static code analysis tools by Seattle.rb folks I'm avoiding sticking these tasks in the Rakefile since they're too slow (and I like GNU Make more than I like Ruby *g*)
2009-01-23Remove unnecessary statements and temp variables
Last I checked, the trailing "return" is not optimized away by MRI 1.8. Additionally, remove some useless temporary variables.
2009-01-23documentation updates
2009-01-23allow using the default class to store files
Don't specify an empty class (e.g. "class="), instead just omit the parameter entirely if it is nil.
2009-01-06Enable test for db_backend
Due to the unfortunate name, it never got run. Oops!
2009-01-06Manifest: add test/test_util.rb
2009-01-06test_backend: shorten timeout test
Since the test server sleeps forever, there's no harm in having a shorter timeout so our tests run faster (over twice as fast with `make -j').
2009-01-06test_backend: race condition caused occasional test failures
Oops, there may be more of these...
2009-01-06syswrite_full: allow an optional timeout to be specified
This makes it easier to use when making requests.
2009-01-06Use syswrite_full where we previously used syswrite
This is a bit safer since we'll retry on short writes instead of silently failing...
2009-01-06Use syswrite_full when PUT-ing smaller files
Socket#send will return with short writes and IO.write just sucks, so expose our existing syswrite_full routine to the public. While we're at it, add a unit test to try to ensure that we're correctly doing syswrite_full here. System-specific behavior dealing with buffer sizes is not easy to test...
2009-01-05Mysql: fix get_paths
Oops, this method needs to bypass transformations we in the normal MogileFS::MogileFS code path.
2009-01-05Remove all trailing whitespace
This got noticed when I imported this project into another project vendor/ subdirectory (no, I've decided to not use submodules for that project).
2009-01-05Update Manifest, include Make target for generating it
2009-01-05mog: fix fallback to MOG_HOSTS env if MOG_TRACKERS is empty
2008-12-30Don't let size(key) get tricked by non-200 OK responses
We never checked the HTTP status code when making the HEAD request. All this HTTP stuff should probably be moved to HTTPFile
2008-12-30Cleanup and document http_get_sock
Correctly fail when we get non-200 HTTP responses and retry on the next URI.
2008-12-30new MogileFS::Network module, move verify_uris there
This will include networks and optimal URI selection support
2008-12-29History: note that 2.0.0 is still a work-in-progress
2008-12-29sysrwloop: make sure descriptors are flushed and synced
"io.sync = true" does not appear to flush file pointers in MRI 1.8, we need to explicitly flush it first.
2008-12-24GNUmakefile: allow "make test/test*.rb" to work
Also, remove the PID uniqueness thing, it's easy enough to just create a new directory if we want to run tests in parallel... Additionally, add ignores in for the log files.
2008-12-24test_mogilefs: fix broken test case that was timing out
And incorrectly nested assertions in the tests made sure the errors were never caught, too. Now the unit tests run in about 3s for me Damn Ruby conventions and 2-space indents...
2008-12-24GNUmakefile: remove dependency on bash3
-o pipefail was only useful when I was experimenting with unbuffering output to the terminal. I've decided to just forgo terminal spewing in the tests, and the lone use of cat(1) is highly unlikely to fail..
2008-12-24test_mogilefs: allow NR_CHUNKS to be overridable via env
This way tests can run quicker by default but we can still use larger ones to test things.
2008-12-23shorten MogileFS__DbBackend test name
2008-12-23HTTPFile: handle multiple device failover correctly
Previously, when we got multiple destinations to upload to and one of them failed, we failed to correctly retry the next destination. This will set the correct devid and URL.
2008-12-23MogileFS::MogileFS: simplify get_paths
We dropped NFS support, so this can be simplified further.
2008-12-23Add GNU Makefile for running tests in a parallel
I'm getting a 40% decreas with my current set of tests on my dual core machine.
2008-12-23test/setup: remove rubygems and zentest assertions
I don't think we ever used the assertions from ZenTest and rubygems increases load time on my box.
2008-12-23test_client: make this work outside of "rake test"
I prefer running my tests directly from the command-line ruby -I lib/ test/test_client.rb
2008-12-23backend: remove pointless connect_to method
We used to mock it for the tests, but we use real sockets now.
2008-12-23test/setup: EACCES, not EACCES_S_
Also, fix up a warning about @thr being uninitialized that showed up in testing.
2008-12-23Make sure select(2) calls are IO.select
We don't mock `select' anywhere, and this makes us safer in case we're included in another module.