[tahoe-lafs-trac-stream] [tahoe-lafs] #1363: refactor storage_client.py, use IServer objects instead of rrefs
tahoe-lafs
trac at tahoe-lafs.org
Sun Feb 20 15:26:58 PST 2011
#1363: refactor storage_client.py, use IServer objects instead of rrefs
------------------------+---------------------------------------------------
Reporter: warner | Owner: zooko
Type: task | Status: assigned
Priority: major | Milestone: undecided
Component: code | Version: 1.8.2
Resolution: | Keywords: review-needed
Launchpad Bug: |
------------------------+---------------------------------------------------
Comment (by zooko):
{{{get_known_servers()}}} returns a new copy of a list, sorted (using the
{{{sorted}}} function), but the only callers of {{{get_known_servers()}}}
are:
* {{{get_connected_servers()}}}, which makes a new frozenset containing a
copy of the list, and
* the welcome page in
[source:trunk/src/allmydata/web/root.py?annotate=blame&rev=4529#L248
web/root.py].
So, I suggest that {{{get_known_servers()}}} should return a list (or a
frozenset for added safety -- David-Sarah and I once spent a long,
miserable night tracking down an elusive bug just before a major release
which turned out to be due to a function having side-effects on a mutable
list of servers that had been passed into it), and that web/root.py should
sort it itself.
(Also that in the future web/root.py offer the user controls to sort the
list of servers by different columns. :-))
This doesn't need to be a blocker for this patch, but it does look like
the kind of thing that Brian might want to tweak.
--
Ticket URL: <http://tahoe-lafs.org/trac/tahoe-lafs/ticket/1363#comment:7>
tahoe-lafs <http://tahoe-lafs.org>
secure decentralized storage
More information about the tahoe-lafs-trac-stream
mailing list