[tahoe-lafs-trac-stream] [Tahoe-LAFS] #3269: Track active_writers without depending on GC/refcounting

Tahoe-LAFS trac at tahoe-lafs.org
Wed Dec 18 23:08:20 UTC 2019


#3269: Track active_writers without depending on GC/refcounting
--------------------------+----------------------
 Reporter:  meejah        |          Owner:
     Type:  defect        |         Status:  new
 Priority:  normal        |      Milestone:  soon
Component:  code-storage  |        Version:  n/a
 Keywords:                |  Launchpad Bug:
--------------------------+----------------------
 In `storage.server` (here https://github.com/tahoe-lafs/tahoe-
 lafs/blob/master/src/allmydata/storage/server.py#L70) the use of
 `WeakKeyDictionary` to track active writers effectively makes the API
 depend on CPython's ref-counting. It's also kind of a terrible API ("when
 the last writer is not referenced, and is reclaimed, then we're not
 writing to it any more"). Also, it won't work under PyPy which uses actual
 garbage-collection.

 There should instead be an explicit API to indicate a writer is done (and
 if any remaining `gc.collect()` exist in the unit-tests these should be
 removed).

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


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