[tahoe-lafs-trac-stream] [tahoe-lafs] #393: mutable: implement MDMF
tahoe-lafs
trac at tahoe-lafs.org
Sun Aug 21 18:50:13 PDT 2011
#393: mutable: implement MDMF
-------------------------+-------------------------------------------------
Reporter: warner | Owner: zooko
Type: | Status: new
enhancement | Milestone: 1.9.0
Priority: major | Version: 1.0.0
Component: code- | Keywords: newcaps performance random-access
mutable | privacy gsoc mdmf mutable backward-
Resolution: | compatibility forward-compatibility review-
Launchpad Bug: | needed
-------------------------+-------------------------------------------------
Comment (by davidsarah):
I added the following tests to {{{test_mutable.py}}}, to try to catch
fencepost errors with zero-length reads. They both fail, although I think
they're correct:
{{{
def test_partial_read_zero_length_at_start(self):
d = self.mdmf_node.get_best_readable_version()
c = consumer.MemoryConsumer()
d.addCallback(lambda version:
version.read(c, 0, 0))
d.addCallback(lambda ignored:
self.failUnlessEqual("", "".join(c.chunks)))
return d
def test_partial_read_zero_length_at_segment_boundary(self):
d = self.mdmf_node.get_best_readable_version()
c = consumer.MemoryConsumer()
offset = mathutil.next_multiple(128 * 1024, 3)
d.addCallback(lambda version:
version.read(c, offset, 0))
d.addCallback(lambda ignored:
self.failUnlessEqual("", "".join(c.chunks)))
return d
}}}
Also, the test named {{{test_partial_read_ending_on_segment_boundary}}} is
actually testing a read ending one byte after a segment boundary. I don't
know whether that's intentional; if it is then the test should be renamed.
--
Ticket URL: <http://tahoe-lafs.org/trac/tahoe-lafs/ticket/393#comment:142>
tahoe-lafs <http://tahoe-lafs.org>
secure decentralized storage
More information about the tahoe-lafs-trac-stream
mailing list