[tahoe-dev] [tahoe-lafs] #329: dirnodes could cache encrypted/serialized entries for speed
tahoe-lafs
trac at allmydata.org
Wed Jul 1 21:28:27 PDT 2009
#329: dirnodes could cache encrypted/serialized entries for speed
---------------------------+------------------------------------------------
Reporter: warner | Owner: kevan
Type: enhancement | Status: new
Priority: minor | Milestone: undecided
Component: code-dirnodes | Version: 0.8.0
Keywords: dirnode | Launchpad_bug:
---------------------------+------------------------------------------------
Comment(by kevan):
That fixed the issue -- thanks.
Just so I'm clear on the next part:
Currently, {{{_unpack_contents}}} returns a dictionary mapping the name of
each child node to a pair {{{(child node instance, metadata)}}}, where
metadata is a dictionary of metadata. {{{_pack_contents}}} gets the
{{{rocap}}} and {{{rwcap}}} (if present) from the child node instance.
What we want to do is
* Modify {{{_unpack_contents}}} to return a dict mapping the name of each
child node to a triple {{{(child node instance, metadata, serialized)}}},
where child node instance and metadata are as they are now, and serialized
is the serialized from of the other data.
* Modify {{{_pack_contents}}} to deal with this new representation;
specifically, to use {{{serialized}}} if present instead of serializing
the other data, which we think is expensive.
* Modify {{{Adder}}}, {{{MetadataSetter}}} and {{{Deleter}}} to work with
these changes; specifically, they should, when modifying a node, set the
corresponding {{{serialized}}} value to None, which will tell
{{{_pack_contents}}} that it needs to re-serialize that node.
* Write tests to make sure that all of this works (probably before doing
the first 3 items). In particular,
* If we pass contents packed with an unmodified {{{_pack_contents}}} to
the new {{{_unpack_contents}}}, we should get the same underlying
directory structure back (i.e.: all expected child node names are present,
and metadata values are as they should be. Is there anything else we'd
want to check?)
* The output of the new {{{_pack_contents}}} should be the same as the
output from the old one, given the same directory structure.
* We should be able to interact with {{{Adder}}}, {{{Deleter}}}, and
{{{MetadataSetter}}} in the same way that we do now. Are there already
tests to adequately verify this, or should I plan on writing those, too?
(apologies if this is pedantic, but I'm still getting the hang of tahoe,
and don't want to go off on an irrelevant tangent because I've made a bad
assumption somewhere)
--
Ticket URL: <http://allmydata.org/trac/tahoe/ticket/329#comment:9>
tahoe-lafs <http://allmydata.org>
secure decentralized file storage grid
More information about the tahoe-dev
mailing list