[tahoe-lafs-trac-stream] [tahoe-lafs] #393: mutable: implement MDMF

tahoe-lafs trac at tahoe-lafs.org
Tue Aug 23 11:53:06 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'm confused by this code in [source:src/allmydata/mutable/publish.py#L134
 publish.py Publish.update]:
 {{{
     def update(self, data, offset, blockhashes, version):
         [...]
         self.datalength = self._node.get_size()
         if data.get_size() > self.datalength:
             self.datalength = data.get_size()
 }}}

 If I understand correctly, {{{self.datalength}}} is the length that we're
 going to update. Because of the issue in comment:38, we don't do partial
 updates yet, which might explain why this code sets {{{self.datalength}}}
 to at least {{{self._node.get_size()}}} (the previous size of the file).
 However, I don't see how this works when {{{offset > 0}}}. If
 ({{{offset}}}, {{{self.datalength}}}) is supposed to be the offset and
 length of the share contents we're going to write, then I would expect:
 {{{
         self.datalength = max(self._node.get_size(), offset +
 data.get_size())
         offset = 0
 }}}
 If ({{{offset}}}, {{{self.datalength}}}) is supposed to be only the offset
 and length of the data the client provided, I would expect just:
 {{{
         self.datalength = data.get_size()
 }}}

-- 
Ticket URL: <http://tahoe-lafs.org/trac/tahoe-lafs/ticket/393#comment:151>
tahoe-lafs <http://tahoe-lafs.org>
secure decentralized storage


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