[tahoe-lafs-trac-stream] [Tahoe-LAFS] #3595: Get rid of `fireEventually` use in EncryptAnUploadable._read_encrypted

Tahoe-LAFS trac at tahoe-lafs.org
Wed Jan 20 16:31:35 UTC 2021


#3595: Get rid of `fireEventually` use in EncryptAnUploadable._read_encrypted
---------------------+---------------------------
 Reporter:  exarkun  |          Owner:
     Type:  defect   |         Status:  new
 Priority:  normal   |      Milestone:  undecided
Component:  unknown  |        Version:  n/a
 Keywords:           |  Launchpad Bug:
---------------------+---------------------------
 `_read_encrypted` uses `fireEventually` to interrupt Deferred chain
 unwinding.  The implementation of `read_encrypted` incurs one additional
 Deferred in the chain per chunk.  There are (total size / 50kB) chunks.
 If there are more than about 200 chunks then this overflows the Python
 stack limit, supposedly.

 There are ways to avoid this overflow without `fireEventually` though.
 Removing `fireEventually` simplifies testing since it removes the implicit
 global reactor dependency.  `fireEventually` also comes from Foolscap so
 removing it also removes one more point of dependency on Foolscap.

--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/3595>
Tahoe-LAFS <https://Tahoe-LAFS.org>
secure decentralized storage


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