#3269 new defect

Track active_writers without depending on GC/refcounting

Reported by: meejah Owned by:
Priority: normal Milestone: soon
Component: code-storage Version: n/a
Keywords: Cc:
Launchpad Bug:

Description

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).

Change History (0)

Note: See TracTickets for help on using tickets.