]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commit
DownloadNode: fix lost-progress in fetch_failed, tolerate cancel when no segment...
authorBrian Warner <warner@lothar.com>
Thu, 5 Aug 2010 18:45:49 +0000 (11:45 -0700)
committerBrian Warner <warner@lothar.com>
Thu, 5 Aug 2010 18:55:07 +0000 (11:55 -0700)
commitf6f9a97627d210a66a1ffe080d347943e4f41d48
tree623d096bafee7a059342190cc89510c035c12d5b
parent43c5032105288a58910756d210403ebf49e37323
DownloadNode: fix lost-progress in fetch_failed, tolerate cancel when no segment-fetch is active. Fixes #1154.

The lost-progress bug occurred when two simultanous read() calls fetched
different segments, and the first one failed (due to corruption, or the other
bugs in #1154): the second read() would never complete. While in this state,
cancelling the second read by having its consumer call stopProducing) would
trigger the cancel-intolerance bug. Finally, in downloader.node.Cancel,
prevent late cancels by adding an 'active' flag
src/allmydata/immutable/downloader/node.py
src/allmydata/test/test_download.py