]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commit - src/allmydata/interfaces.py
fix #1223, crash+inefficiency during repair due to read overrun
authorBrian Warner <warner@lothar.com>
Fri, 29 Oct 2010 08:20:36 +0000 (01:20 -0700)
committerBrian Warner <warner@lothar.com>
Fri, 29 Oct 2010 08:20:36 +0000 (01:20 -0700)
commitc18953c169fe9e7cfca75c33474aab0c92968db8
tree0ff4e235fbd8fb67fc1d73ede92e9d973a38b43c
parent390c40cd8ce1e57985f6b635ded47c9d4aefae30
fix #1223, crash+inefficiency during repair due to read overrun

* repairer (really the uploader) reads beyond end of input file (Uploadable)
* new-downloader does not tolerate overreads
* uploader does lots of tiny reads (inefficient)

This fixes the last two. The uploader still does a single overread at the end
of the input file, but now that's ok so we can leave it in place. The
uploader now expects the Uploadable to behave like a normal disk
file (reading beyond EOF will return less data than was asked for), and now
the new-downloadable behaves that way.
src/allmydata/immutable/downloader/node.py
src/allmydata/immutable/encode.py
src/allmydata/interfaces.py
src/allmydata/test/test_repairer.py