[tahoe-dev] [tahoe-lafs] #607: DIR2:IMM

tahoe-lafs trac at allmydata.org
Fri Oct 30 23:58:58 UTC 2009


#607: DIR2:IMM
---------------------------+------------------------------------------------
 Reporter:  zooko          |           Owner:  warner   
     Type:  defect         |          Status:  new      
 Priority:  major          |       Milestone:  undecided
Component:  code-dirnodes  |         Version:  1.2.0    
 Keywords:  newcaps        |   Launchpad_bug:           
---------------------------+------------------------------------------------

Comment(by warner):

 I'm about 80% done with immutable directories. The current work is to add
 {{{URI:DIR2-CHK:}}} and {{{URI:DIR2-LIT:}}} to the set recognized by
 {{{uri.py}}}. (I'm planning to use CHK because the rest of the arguments
 are exactly the same as {{{URI:CHK:/URI:LIT:}}}). An ideal cap format
 would make the wrapping more explicit, like
 {{{tahoe://grid-4/dir/imm/READCAP}}} and {{{tahoe://grid-4/imm/READCAP}}}.

 The next few steps are:

  * modify nodemaker.py to recognize the new caps and create immutable
 Filenodes for them and then wrap them in Directorynodes (this handles the
 read side)
  * add {{{nodemaker.create_immutable_directory(children)}}} to pack the
 children, perform an immutable upload, then transform the filecap into a
 dircap. (this handles the write side)
  * tests for those
  * new webapi (probably {{{POST /uri?t=mkdir-immutable}}}) that takes a
 JSON dict in the children= form portion: docs, tests, then implementation
  * done!

 Along the way, I plan to change "tahoe backup" to use t=mkdir-with-
 children (which will speed things up a lot, but still create readcaps-to-
 mutable-directories). Then, once this ticket is closed, I'll change it
 again to use t=mkdir-immutable.

 Incidentally, yeah, I think that a form of "cp -r" that creates an
 immutable deep copy of some dirnode would be a great idea. Maybe "cp -r
 --immutable" ? Likewise, it might be useful to have "cp -r --mutable",
 which explicitly creates mutable copies of everything being copied (at
 least of the dirnodes). The default behavior of "cp -r" should be to re-
 use immutable objects.

-- 
Ticket URL: <http://allmydata.org/trac/tahoe/ticket/607#comment:8>
tahoe-lafs <http://allmydata.org>
secure decentralized file storage grid


More information about the tahoe-dev mailing list