[tahoe-lafs-trac-stream] [tahoe-lafs] #1525: SFTP: handle download failures correctly

tahoe-lafs trac at tahoe-lafs.org
Sat Sep 3 18:57:06 PDT 2011


#1525: SFTP: handle download failures correctly
-------------------------------------------------+-------------------------
 Reporter:  davidsarah                           |          Owner:
     Type:  defect                               |  davidsarah
 Priority:  major                                |         Status:  new
Component:  code-frontend                        |      Milestone:  soon
 Keywords:  sftp hang error streaming            |        Version:  1.9.0a1
  performance test-needed                        |  Launchpad Bug:
-------------------------------------------------+-------------------------
 Brian noticed that a Deferred was being dropped at
 [source:src/allmydata/frontends/sftpd.py at 5179#L676]. (Although this code
 changed when MDMF landed [5179], the immutable path of the
 [source:src/allmydata/frontends/sftpd.py at 5127#L675 previous code] also
 dropped a Deferred, at line 680.)

 It is incorrect to drop the Deferred, because that will cause SFTP read
 requests to hang if downloading the previous file contents fails. However
 fixing it while still allowing streaming reads is a bit tricky. The
 intention is that we download the file in parallel with accepting SFTP
 requests, and block each read request until the relevant part of the file
 is available (and prior writes have completed). If the download fails,
 then any SFTP read requests past the prefix that was read correctly should
 also fail. Also, if the file was written and not truncated, the SFTP close
 request should fail, at least in the case when the new contents depend on
 the part of the old contents that we weren't able to download.

-- 
Ticket URL: <http://tahoe-lafs.org/trac/tahoe-lafs/ticket/1525>
tahoe-lafs <http://tahoe-lafs.org>
secure decentralized storage


More information about the tahoe-lafs-trac-stream mailing list