directories: keep track of your position as you decode netstring after netstring from an input buffer instead of copying the trailing part
This makes decoding linear in the number of netstrings instead of O(N^2).
directories: in bench_dirnode.py, use a real CacheDirectoryManager instead of a fake one (because CacheDirectoryManager is a significant user of CPU and/or time)
test/benchmark: benchmark the time to pack and unpack dirnodes
See also the prof_benchmarks() function in this file which will run the benchmarks under profiling.
Brian Warner [Fri, 3 Jul 2009 07:28:04 +0000 (00:28 -0700)]
clean up debian packaging: we have control files for etch/lenny/sid, and
everything else uses one of those. Add dependency on python-pysqlite2 for
platforms that use py2.4 by default. Update foolscap dependency to 0.4.1.
Brian Warner [Fri, 3 Jul 2009 01:07:49 +0000 (18:07 -0700)]
Tolerate unknown URI types in directory structures. Part of #683.
The idea is that future versions of Tahoe will add new URI types that this
version won't recognize, but might store them in directories that we *can*
read. We should handle these "objects from the future" as best we can.
Previous releases of Tahoe would just explode. With this change, we'll
continue to be able to work with everything else in the directory.
The code change is to wrap anything we don't recognize as an UnknownNode
instance (as opposed to a FileNode or DirectoryNode). Then webapi knows how
to render these (mostly by leaving fields blank), deep-check knows to skip
over them, deep-stats counts them in "count-unknown". You can rename and
delete these things, but you can't add new ones (because we wouldn't know how
to generate a readcap to put into the dirnode's rocap slot, and because this
lets us catch typos better).
Brian Warner [Wed, 1 Jul 2009 01:13:43 +0000 (18:13 -0700)]
mutable repairer: skip repair of readcaps instead of throwing an exception.
This should improve the behavior of #625 a bit: at least all the files will
get repaired.
Brian Warner [Mon, 29 Jun 2009 22:31:24 +0000 (15:31 -0700)]
use 522-bit RSA keys in all unit tests (except one)
This reduces the total test time on my laptop from 400s to 283s.
* src/allmydata/test/test_system.py (SystemTest.test_mutable._test_debug):
Remove assertion about container_size/data_size, this changes with keysize
and was too variable anyways.
* src/allmydata/mutable/filenode.py (MutableFileNode.create): add keysize=
* src/allmydata/dirnode.py (NewDirectoryNode.create): same
* src/allmydata/client.py (Client.DEFAULT_MUTABLE_KEYSIZE): add default,
this overrides the one in MutableFileNode
Brian Warner [Fri, 26 Jun 2009 06:20:22 +0000 (23:20 -0700)]
mutable/filenode.py: set _writekey to None, rather than leaving it missing
This will at least turn the really really weird error when a repair of a
readonly mutable file is attempted into a merely really weird assertion that
mentions "repair currently requires a writecap".
Brian Warner [Thu, 25 Jun 2009 02:17:07 +0000 (19:17 -0700)]
Split out NoSharesError, stop adding attributes to NotEnoughSharesError, change humanize_failure to include the original exception string, update tests, behave better if humanize_failure fails.
docs: remove warning about inability to build modules on py2.6 on Windows with mingw, differentiate between clients and servers, reflow to a consistent column width (79), add hint about firewall/NAT docs.
kevan [Sat, 20 Jun 2009 21:28:22 +0000 (14:28 -0700)]
change max filesize limit tests
Instead of testing to see that the previous SDMF filesize limit was being
obeyed, we now test to make sure that we can insert files larger than that
limit.
util: hooray! A clean implementation of this simple utility! Black Dew pointed out that the inverse of time.gmtime() is hidden in the "calendar" module.
util: oops, time.tzset() doesn't work on Windows -- hopefully the new "London" unit test passes on Windows when we skip tzset() on platforms that don't have it
backup: remove the --no-backupdb command, the handling of "can't import sqlite", and the related tests, and change an error message to more correctly indicate failure to load the database from disk rather than failure to import sqlite module
Fixes #728.
Brian Warner [Tue, 2 Jun 2009 02:25:11 +0000 (19:25 -0700)]
more storage_broker refactoring: downloader gets a broker instead of a client,
use Client.get_storage_broker() accessor instead of direct attribute access.
Brian Warner [Mon, 1 Jun 2009 22:50:07 +0000 (15:50 -0700)]
test_runner.py: remove test_client_no_noise: the issue in question is
ticketed in http://divmod.org/trac/ticket/2830 and doesn't need a Tahoe-side
change, plus this test fails on win32 for unrelated reasons (and test_client
is the place to think about the win32 issue).
Brian Warner [Mon, 1 Jun 2009 22:49:16 +0000 (15:49 -0700)]
remove plaintext-hashing code from the helper interface, to close #722
and deny the Helper the ability to mount a partial-information-guessing
attack. This will probably break compatibility between new clients and very
old (pre-1.0) helpers.
Brian Warner [Mon, 1 Jun 2009 21:06:04 +0000 (14:06 -0700)]
start to factor server-connection-management into a distinct 'StorageServerFarmBroker' object, separate from the client and the introducer. This is the starting point for #467: static server selection
Brian Warner [Fri, 22 May 2009 18:44:24 +0000 (11:44 -0700)]
immutable/encode.py: tolerate immediate _remove_shareholder by copying the
landlord list before iterating over it. This can probably only happen in unit
tests, but cleaning it up makes certain test failures easier to analyze.