[tahoe-lafs-trac-stream] [tahoe-lafs] #1869: pluggable backends: serialize backend operations on a shareset
tahoe-lafs
trac at tahoe-lafs.org
Tue Apr 23 22:53:15 UTC 2013
#1869: pluggable backends: serialize backend operations on a shareset
-------------------------+-------------------------------------------------
Reporter: | Owner:
davidsarah | Status: new
Type: defect | Milestone: 1.11.0
Priority: normal | Version: cloud-branch
Component: code- | Keywords: cloud-backend storage shareset
storage | cache design-review-needed
Resolution: |
Launchpad Bug: |
-------------------------+-------------------------------------------------
Changes (by daira):
* keywords: cloud-backend storage shareset cache => cloud-backend storage
shareset cache design-review-needed
* owner: daira =>
Comment:
Okay, I think I understand how this will work now. We'll have a
!WeakValueDictionary of !DeferredLocks, indexed by storage index, in each
backend object. The lock object will be passed on to !ShareSet,
!BucketReader, and !BucketWriter objects for that SI, and will be used to
lock the remote operations. (Most of this can be done generically without
only minimal support in the backend-specific objects.)
A subtle complication is that because the locks are associated with
sharesets, the {{{get_sharesets_for_prefix}}} method on a backend needs to
have a rather weak specification:
{{{
def get_sharesets_for_prefix(prefix):
"""
Return a Deferred that fires with an iterable of IShareSet objects
for all storage indices matching the given base-32 prefix, for
which this backend holds shares.
Separate locks are taken for each shareset, and nothing prevents
sharesets matching the prefix from being deleted or added between
listing the sharesets and taking these locks. Callers must be able
to tolerate this.
"""
}}}
--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/1869#comment:4>
tahoe-lafs <https://tahoe-lafs.org>
secure decentralized storage
More information about the tahoe-lafs-trac-stream
mailing list