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

tahoe-lafs trac at tahoe-lafs.org
Mon Feb 21 19:49:47 PST 2011


#393: mutable: implement MDMF
------------------------------+---------------------------------------------
     Reporter:  warner        |       Owner:  kevan                                                                                                                 
         Type:  enhancement   |      Status:  assigned                                                                                                              
     Priority:  major         |   Milestone:  1.9.0                                                                                                                 
    Component:  code-mutable  |     Version:  1.0.0                                                                                                                 
   Resolution:                |    Keywords:  newcaps performance random-access privacy gsoc mdmf mutable backward-compatibility forward-compatibility review-needed
Launchpad Bug:                |  
------------------------------+---------------------------------------------

Comment (by kevan):

 Replying to [comment:70 warner]:

 > The big new webapi method is a PUT/POST operation to a mutable file that
 includes an {{{offset=X}}} argument, allowing you to modify the middle of
 an existing mutable file. But it looks like negative offsets are used to
 mean "do the old-style replace-the-whole-file behavior". Should we reserve
 negative offsets for something more useful in the future (by having them
 raise an error for now)? I'm thinking that it'd be nice to have an easy
 API to append to a mutable file, and right now it seems like the only way
 to accomplish that is to first do a {{{t=json}}} query to learn the size
 of the file, then do a PUT with {{{offset=size}}}. I can imagine wanting
 to express an append with {{{offset=-1}}} or {{{offset=append}}} or
 something like that, and I don't want to teach webapi users that using
 {{{offset=-X}}} means "replace", making it unsafe for us to reclaim that
 portion of the argument space later.
 >
 > thoughts?

 Agreed; we shouldn't deny ourselves that part of the argument space,
 especially not for the sake of making the fairly unintuitive
 "{{{offset=-1}}} means replace the whole thing" behavior work. How about
 {{{offset=replace}}} for the current whole file replacement behavior,
 {{{offset >= 0}}} to replace part of the file, and {{{offset < 0}}} throws
 an exception for now? We'll say that {{{offset=replace}}} by default
 (i.e.: if the caller doesn't specify their own offset) so that callers get
 the whole file replacement behavior that they're accustomed to by default.

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


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