[tahoe-lafs-trac-stream] [tahoe-lafs] #1382: immutable peer selection refactoring and enhancements

tahoe-lafs trac at tahoe-lafs.org
Mon Sep 9 22:16:49 UTC 2013


#1382: immutable peer selection refactoring and enhancements
-------------------------+-------------------------------------------------
     Reporter:  kevan    |      Owner:  markberger
         Type:           |     Status:  new
  enhancement            |  Milestone:  1.11.0
     Priority:  major    |    Version:  1.8.2
    Component:  code-    |   Keywords:  review-needed servers-of-happiness
  peerselection          |  blocks-release
   Resolution:           |
Launchpad Bug:           |
-------------------------+-------------------------------------------------

Comment (by markberger):

 I've pushed some commits which fix the issues with the documentation and
 the happiness_upload class.

 >    * Write a unit test showing that _flow_network() returns the right
 answer for a range of inputs.
 >    * Okay, okay, hold on.
 allmydata.immutable.happiness_upload.Happiness_Upload._flow_network is
 almost identical to allmydata.util.happinessutil.flow_network_for. And,
 the latter looks like it has more of the kind of documentation that I'm
 asking for here. (But not yet the unit test that I asked for here.) Also
 allmydata.immutable.happiness_upload.Happiness_Upload._servermap_flow_graph.
 So: can we refactor these three functions into one function? And write
 unit tests for it?

 I tried to refactor those two functions into one, but servers are indexed
 differently between the two and I couldn't figure out how to normalize the
 input. I will try again later when I have more time.

-- 
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/1382#comment:44>
tahoe-lafs <https://tahoe-lafs.org>
secure decentralized storage


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