2008-03-05 21:59:56 +00:00
|
|
|
|
2008-04-17 20:02:22 +00:00
|
|
|
import time, pprint, itertools
|
2008-03-27 23:46:08 +00:00
|
|
|
import simplejson
|
2008-03-05 21:59:56 +00:00
|
|
|
from twisted.internet import defer
|
2008-03-27 23:46:08 +00:00
|
|
|
from nevow import rend, inevow, tags as T
|
2008-03-05 21:59:56 +00:00
|
|
|
from allmydata.util import base32, idlib
|
2009-02-20 19:15:54 +00:00
|
|
|
from allmydata.web.common import getxmlfile, get_arg, \
|
2010-08-15 14:19:33 +00:00
|
|
|
abbreviate_time, abbreviate_rate, abbreviate_size, plural, compute_rate
|
2008-03-05 21:59:56 +00:00
|
|
|
from allmydata.interfaces import IUploadStatus, IDownloadStatus, \
|
2008-04-17 02:05:41 +00:00
|
|
|
IPublishStatus, IRetrieveStatus, IServermapUpdaterStatus
|
2008-03-05 21:59:56 +00:00
|
|
|
|
|
|
|
class RateAndTimeMixin:
|
|
|
|
|
|
|
|
def render_time(self, ctx, data):
|
2008-03-07 04:16:38 +00:00
|
|
|
return abbreviate_time(data)
|
2008-03-05 21:59:56 +00:00
|
|
|
|
|
|
|
def render_rate(self, ctx, data):
|
2008-03-07 04:16:38 +00:00
|
|
|
return abbreviate_rate(data)
|
2008-03-05 21:59:56 +00:00
|
|
|
|
|
|
|
class UploadResultsRendererMixin(RateAndTimeMixin):
|
|
|
|
# this requires a method named 'upload_results'
|
|
|
|
|
2008-03-06 02:51:51 +00:00
|
|
|
def render_pushed_shares(self, ctx, data):
|
|
|
|
d = self.upload_results()
|
2012-05-22 04:14:28 +00:00
|
|
|
d.addCallback(lambda res: res.get_pushed_shares())
|
2008-03-06 02:51:51 +00:00
|
|
|
return d
|
|
|
|
|
|
|
|
def render_preexisting_shares(self, ctx, data):
|
|
|
|
d = self.upload_results()
|
2012-05-22 04:14:28 +00:00
|
|
|
d.addCallback(lambda res: res.get_preexisting_shares())
|
2008-03-06 02:51:51 +00:00
|
|
|
return d
|
|
|
|
|
2008-03-05 21:59:56 +00:00
|
|
|
def render_sharemap(self, ctx, data):
|
|
|
|
d = self.upload_results()
|
2012-05-22 04:14:28 +00:00
|
|
|
d.addCallback(lambda res: res.get_sharemap())
|
2008-03-05 21:59:56 +00:00
|
|
|
def _render(sharemap):
|
|
|
|
if sharemap is None:
|
|
|
|
return "None"
|
|
|
|
l = T.ul()
|
2012-05-22 04:18:37 +00:00
|
|
|
for shnum, servers in sorted(sharemap.items()):
|
|
|
|
server_names = ', '.join([s.get_name() for s in servers])
|
|
|
|
l[T.li["%d -> placed on [%s]" % (shnum, server_names)]]
|
2008-03-05 21:59:56 +00:00
|
|
|
return l
|
|
|
|
d.addCallback(_render)
|
|
|
|
return d
|
|
|
|
|
|
|
|
def render_servermap(self, ctx, data):
|
|
|
|
d = self.upload_results()
|
2012-05-22 04:14:28 +00:00
|
|
|
d.addCallback(lambda res: res.get_servermap())
|
2008-03-05 21:59:56 +00:00
|
|
|
def _render(servermap):
|
|
|
|
if servermap is None:
|
|
|
|
return "None"
|
|
|
|
l = T.ul()
|
2012-05-22 04:18:37 +00:00
|
|
|
for server, shnums in sorted(servermap.items()):
|
|
|
|
shares_s = ",".join(["#%d" % shnum for shnum in shnums])
|
|
|
|
l[T.li["[%s] got share%s: %s" % (server.get_name(),
|
|
|
|
plural(shnums), shares_s)]]
|
2008-03-05 21:59:56 +00:00
|
|
|
return l
|
|
|
|
d.addCallback(_render)
|
|
|
|
return d
|
|
|
|
|
|
|
|
def data_file_size(self, ctx, data):
|
|
|
|
d = self.upload_results()
|
2012-05-22 04:14:28 +00:00
|
|
|
d.addCallback(lambda res: res.get_file_size())
|
2008-03-05 21:59:56 +00:00
|
|
|
return d
|
|
|
|
|
|
|
|
def _get_time(self, name):
|
|
|
|
d = self.upload_results()
|
2012-05-22 04:14:28 +00:00
|
|
|
d.addCallback(lambda res: res.get_timings().get(name))
|
2008-03-05 21:59:56 +00:00
|
|
|
return d
|
|
|
|
|
|
|
|
def data_time_total(self, ctx, data):
|
|
|
|
return self._get_time("total")
|
|
|
|
|
|
|
|
def data_time_storage_index(self, ctx, data):
|
|
|
|
return self._get_time("storage_index")
|
|
|
|
|
|
|
|
def data_time_contacting_helper(self, ctx, data):
|
|
|
|
return self._get_time("contacting_helper")
|
|
|
|
|
|
|
|
def data_time_cumulative_fetch(self, ctx, data):
|
|
|
|
return self._get_time("cumulative_fetch")
|
|
|
|
|
|
|
|
def data_time_helper_total(self, ctx, data):
|
|
|
|
return self._get_time("helper_total")
|
|
|
|
|
|
|
|
def data_time_peer_selection(self, ctx, data):
|
|
|
|
return self._get_time("peer_selection")
|
|
|
|
|
|
|
|
def data_time_total_encode_and_push(self, ctx, data):
|
|
|
|
return self._get_time("total_encode_and_push")
|
|
|
|
|
|
|
|
def data_time_cumulative_encoding(self, ctx, data):
|
|
|
|
return self._get_time("cumulative_encoding")
|
|
|
|
|
|
|
|
def data_time_cumulative_sending(self, ctx, data):
|
|
|
|
return self._get_time("cumulative_sending")
|
|
|
|
|
|
|
|
def data_time_hashes_and_close(self, ctx, data):
|
|
|
|
return self._get_time("hashes_and_close")
|
|
|
|
|
|
|
|
def _get_rate(self, name):
|
|
|
|
d = self.upload_results()
|
|
|
|
def _convert(r):
|
2012-05-22 04:14:28 +00:00
|
|
|
file_size = r.get_file_size()
|
|
|
|
time = r.get_timings().get(name)
|
2010-08-15 14:19:33 +00:00
|
|
|
return compute_rate(file_size, time)
|
2008-03-05 21:59:56 +00:00
|
|
|
d.addCallback(_convert)
|
|
|
|
return d
|
|
|
|
|
|
|
|
def data_rate_total(self, ctx, data):
|
|
|
|
return self._get_rate("total")
|
|
|
|
|
|
|
|
def data_rate_storage_index(self, ctx, data):
|
|
|
|
return self._get_rate("storage_index")
|
|
|
|
|
|
|
|
def data_rate_encode(self, ctx, data):
|
|
|
|
return self._get_rate("cumulative_encoding")
|
|
|
|
|
|
|
|
def data_rate_push(self, ctx, data):
|
|
|
|
return self._get_rate("cumulative_sending")
|
|
|
|
|
|
|
|
def data_rate_encode_and_push(self, ctx, data):
|
|
|
|
d = self.upload_results()
|
|
|
|
def _convert(r):
|
2012-05-22 04:14:28 +00:00
|
|
|
file_size = r.get_file_size()
|
|
|
|
time1 = r.get_timings().get("cumulative_encoding")
|
|
|
|
time2 = r.get_timings().get("cumulative_sending")
|
2010-08-15 14:19:33 +00:00
|
|
|
if (time1 is None or time2 is None):
|
2008-03-05 21:59:56 +00:00
|
|
|
return None
|
2010-08-15 14:19:33 +00:00
|
|
|
else:
|
|
|
|
return compute_rate(file_size, time1+time2)
|
2008-03-05 21:59:56 +00:00
|
|
|
d.addCallback(_convert)
|
|
|
|
return d
|
|
|
|
|
|
|
|
def data_rate_ciphertext_fetch(self, ctx, data):
|
|
|
|
d = self.upload_results()
|
|
|
|
def _convert(r):
|
2012-05-22 04:14:28 +00:00
|
|
|
fetch_size = r.get_ciphertext_fetched()
|
|
|
|
time = r.get_timings().get("cumulative_fetch")
|
2010-08-15 14:19:33 +00:00
|
|
|
return compute_rate(fetch_size, time)
|
2008-03-05 21:59:56 +00:00
|
|
|
d.addCallback(_convert)
|
|
|
|
return d
|
|
|
|
|
|
|
|
class UploadStatusPage(UploadResultsRendererMixin, rend.Page):
|
|
|
|
docFactory = getxmlfile("upload-status.xhtml")
|
|
|
|
|
|
|
|
def __init__(self, data):
|
|
|
|
rend.Page.__init__(self, data)
|
|
|
|
self.upload_status = data
|
|
|
|
|
|
|
|
def upload_results(self):
|
|
|
|
return defer.maybeDeferred(self.upload_status.get_results)
|
|
|
|
|
|
|
|
def render_results(self, ctx, data):
|
|
|
|
d = self.upload_results()
|
|
|
|
def _got_results(results):
|
|
|
|
if results:
|
|
|
|
return ctx.tag
|
|
|
|
return ""
|
|
|
|
d.addCallback(_got_results)
|
|
|
|
return d
|
|
|
|
|
|
|
|
def render_started(self, ctx, data):
|
|
|
|
TIME_FORMAT = "%H:%M:%S %d-%b-%Y"
|
|
|
|
started_s = time.strftime(TIME_FORMAT,
|
|
|
|
time.localtime(data.get_started()))
|
|
|
|
return started_s
|
|
|
|
|
|
|
|
def render_si(self, ctx, data):
|
|
|
|
si_s = base32.b2a_or_none(data.get_storage_index())
|
|
|
|
if si_s is None:
|
|
|
|
si_s = "(None)"
|
|
|
|
return si_s
|
|
|
|
|
|
|
|
def render_helper(self, ctx, data):
|
|
|
|
return {True: "Yes",
|
|
|
|
False: "No"}[data.using_helper()]
|
|
|
|
|
|
|
|
def render_total_size(self, ctx, data):
|
|
|
|
size = data.get_size()
|
|
|
|
if size is None:
|
2008-05-07 20:53:58 +00:00
|
|
|
return "(unknown)"
|
2008-03-05 21:59:56 +00:00
|
|
|
return size
|
|
|
|
|
|
|
|
def render_progress_hash(self, ctx, data):
|
|
|
|
progress = data.get_progress()[0]
|
|
|
|
# TODO: make an ascii-art bar
|
|
|
|
return "%.1f%%" % (100.0 * progress)
|
|
|
|
|
|
|
|
def render_progress_ciphertext(self, ctx, data):
|
|
|
|
progress = data.get_progress()[1]
|
|
|
|
# TODO: make an ascii-art bar
|
|
|
|
return "%.1f%%" % (100.0 * progress)
|
|
|
|
|
|
|
|
def render_progress_encode_push(self, ctx, data):
|
|
|
|
progress = data.get_progress()[2]
|
|
|
|
# TODO: make an ascii-art bar
|
|
|
|
return "%.1f%%" % (100.0 * progress)
|
|
|
|
|
|
|
|
def render_status(self, ctx, data):
|
|
|
|
return data.get_status()
|
|
|
|
|
|
|
|
class DownloadResultsRendererMixin(RateAndTimeMixin):
|
|
|
|
# this requires a method named 'download_results'
|
|
|
|
|
|
|
|
def render_servermap(self, ctx, data):
|
|
|
|
d = self.download_results()
|
|
|
|
d.addCallback(lambda res: res.servermap)
|
|
|
|
def _render(servermap):
|
|
|
|
if servermap is None:
|
|
|
|
return "None"
|
|
|
|
l = T.ul()
|
|
|
|
for peerid in sorted(servermap.keys()):
|
|
|
|
peerid_s = idlib.shortnodeid_b2a(peerid)
|
|
|
|
shares_s = ",".join(["#%d" % shnum
|
|
|
|
for shnum in servermap[peerid]])
|
|
|
|
l[T.li["[%s] has share%s: %s" % (peerid_s,
|
|
|
|
plural(servermap[peerid]),
|
|
|
|
shares_s)]]
|
|
|
|
return l
|
|
|
|
d.addCallback(_render)
|
|
|
|
return d
|
|
|
|
|
|
|
|
def render_servers_used(self, ctx, data):
|
|
|
|
d = self.download_results()
|
|
|
|
d.addCallback(lambda res: res.servers_used)
|
|
|
|
def _got(servers_used):
|
|
|
|
if not servers_used:
|
|
|
|
return ""
|
|
|
|
peerids_s = ", ".join(["[%s]" % idlib.shortnodeid_b2a(peerid)
|
|
|
|
for peerid in servers_used])
|
|
|
|
return T.li["Servers Used: ", peerids_s]
|
|
|
|
d.addCallback(_got)
|
|
|
|
return d
|
|
|
|
|
|
|
|
def render_problems(self, ctx, data):
|
|
|
|
d = self.download_results()
|
|
|
|
d.addCallback(lambda res: res.server_problems)
|
|
|
|
def _got(server_problems):
|
|
|
|
if not server_problems:
|
|
|
|
return ""
|
|
|
|
l = T.ul()
|
|
|
|
for peerid in sorted(server_problems.keys()):
|
|
|
|
peerid_s = idlib.shortnodeid_b2a(peerid)
|
|
|
|
l[T.li["[%s]: %s" % (peerid_s, server_problems[peerid])]]
|
|
|
|
return T.li["Server Problems:", l]
|
|
|
|
d.addCallback(_got)
|
|
|
|
return d
|
|
|
|
|
|
|
|
def data_file_size(self, ctx, data):
|
|
|
|
d = self.download_results()
|
|
|
|
d.addCallback(lambda res: res.file_size)
|
|
|
|
return d
|
|
|
|
|
|
|
|
def _get_time(self, name):
|
|
|
|
d = self.download_results()
|
|
|
|
d.addCallback(lambda res: res.timings.get(name))
|
|
|
|
return d
|
|
|
|
|
|
|
|
def data_time_total(self, ctx, data):
|
|
|
|
return self._get_time("total")
|
|
|
|
|
|
|
|
def data_time_peer_selection(self, ctx, data):
|
|
|
|
return self._get_time("peer_selection")
|
|
|
|
|
|
|
|
def data_time_uri_extension(self, ctx, data):
|
|
|
|
return self._get_time("uri_extension")
|
|
|
|
|
|
|
|
def data_time_hashtrees(self, ctx, data):
|
|
|
|
return self._get_time("hashtrees")
|
|
|
|
|
|
|
|
def data_time_segments(self, ctx, data):
|
|
|
|
return self._get_time("segments")
|
|
|
|
|
|
|
|
def data_time_cumulative_fetch(self, ctx, data):
|
|
|
|
return self._get_time("cumulative_fetch")
|
|
|
|
|
|
|
|
def data_time_cumulative_decode(self, ctx, data):
|
|
|
|
return self._get_time("cumulative_decode")
|
|
|
|
|
|
|
|
def data_time_cumulative_decrypt(self, ctx, data):
|
|
|
|
return self._get_time("cumulative_decrypt")
|
|
|
|
|
2008-04-21 19:19:17 +00:00
|
|
|
def data_time_paused(self, ctx, data):
|
|
|
|
return self._get_time("paused")
|
|
|
|
|
2008-03-05 21:59:56 +00:00
|
|
|
def _get_rate(self, name):
|
|
|
|
d = self.download_results()
|
|
|
|
def _convert(r):
|
|
|
|
file_size = r.file_size
|
|
|
|
time = r.timings.get(name)
|
2010-08-15 14:19:33 +00:00
|
|
|
return compute_rate(file_size, time)
|
2008-03-05 21:59:56 +00:00
|
|
|
d.addCallback(_convert)
|
|
|
|
return d
|
|
|
|
|
|
|
|
def data_rate_total(self, ctx, data):
|
|
|
|
return self._get_rate("total")
|
|
|
|
|
|
|
|
def data_rate_segments(self, ctx, data):
|
|
|
|
return self._get_rate("segments")
|
|
|
|
|
|
|
|
def data_rate_fetch(self, ctx, data):
|
|
|
|
return self._get_rate("cumulative_fetch")
|
|
|
|
|
|
|
|
def data_rate_decode(self, ctx, data):
|
|
|
|
return self._get_rate("cumulative_decode")
|
|
|
|
|
|
|
|
def data_rate_decrypt(self, ctx, data):
|
|
|
|
return self._get_rate("cumulative_decrypt")
|
|
|
|
|
|
|
|
def render_server_timings(self, ctx, data):
|
|
|
|
d = self.download_results()
|
|
|
|
d.addCallback(lambda res: res.timings.get("fetch_per_server"))
|
|
|
|
def _render(per_server):
|
|
|
|
if per_server is None:
|
|
|
|
return ""
|
|
|
|
l = T.ul()
|
|
|
|
for peerid in sorted(per_server.keys()):
|
|
|
|
peerid_s = idlib.shortnodeid_b2a(peerid)
|
|
|
|
times_s = ", ".join([self.render_time(None, t)
|
|
|
|
for t in per_server[peerid]])
|
|
|
|
l[T.li["[%s]: %s" % (peerid_s, times_s)]]
|
|
|
|
return T.li["Per-Server Segment Fetch Response Times: ", l]
|
|
|
|
d.addCallback(_render)
|
|
|
|
return d
|
|
|
|
|
|
|
|
class DownloadStatusPage(DownloadResultsRendererMixin, rend.Page):
|
|
|
|
docFactory = getxmlfile("download-status.xhtml")
|
|
|
|
|
|
|
|
def __init__(self, data):
|
|
|
|
rend.Page.__init__(self, data)
|
|
|
|
self.download_status = data
|
|
|
|
|
2011-06-29 22:26:06 +00:00
|
|
|
def child_timeline(self, ctx):
|
|
|
|
return DownloadStatusTimelinePage(self.download_status)
|
|
|
|
|
2008-03-05 21:59:56 +00:00
|
|
|
def download_results(self):
|
|
|
|
return defer.maybeDeferred(self.download_status.get_results)
|
|
|
|
|
2010-08-04 07:27:02 +00:00
|
|
|
def relative_time(self, t):
|
|
|
|
if t is None:
|
|
|
|
return t
|
2011-06-29 22:25:55 +00:00
|
|
|
if self.download_status.first_timestamp is not None:
|
|
|
|
return t - self.download_status.first_timestamp
|
2010-08-04 07:27:02 +00:00
|
|
|
return t
|
|
|
|
def short_relative_time(self, t):
|
|
|
|
t = self.relative_time(t)
|
|
|
|
if t is None:
|
|
|
|
return ""
|
|
|
|
return "+%.6fs" % t
|
|
|
|
|
2011-06-29 22:25:55 +00:00
|
|
|
def _find_overlap(self, events, start_key, end_key):
|
|
|
|
# given a list of event dicts, return a new list in which each event
|
2011-08-01 18:54:01 +00:00
|
|
|
# has an extra "row" key (an int, starting at 0), and if appropriate
|
|
|
|
# a "serverid" key (ascii-encoded server id), replacing the "server"
|
|
|
|
# key. This is a hint to our JS frontend about how to overlap the
|
|
|
|
# parts of the graph it is drawing.
|
2011-06-29 22:25:55 +00:00
|
|
|
|
2011-08-01 18:54:01 +00:00
|
|
|
# we must always make a copy, since we're going to be adding keys
|
|
|
|
# and don't want to change the original objects. If we're
|
2011-06-29 22:25:55 +00:00
|
|
|
# stringifying serverids, we'll also be changing the serverid keys.
|
|
|
|
new_events = []
|
|
|
|
rows = []
|
|
|
|
for ev in events:
|
|
|
|
ev = ev.copy()
|
2011-08-01 18:54:01 +00:00
|
|
|
if ev.has_key('server'):
|
2012-06-12 21:01:24 +00:00
|
|
|
ev["serverid"] = ev["server"].get_longname()
|
2011-08-01 18:54:01 +00:00
|
|
|
del ev["server"]
|
2011-06-29 22:25:55 +00:00
|
|
|
# find an empty slot in the rows
|
|
|
|
free_slot = None
|
|
|
|
for row,finished in enumerate(rows):
|
|
|
|
if finished is not None:
|
|
|
|
if ev[start_key] > finished:
|
|
|
|
free_slot = row
|
|
|
|
break
|
|
|
|
if free_slot is None:
|
|
|
|
free_slot = len(rows)
|
|
|
|
rows.append(ev[end_key])
|
|
|
|
else:
|
|
|
|
rows[free_slot] = ev[end_key]
|
|
|
|
ev["row"] = free_slot
|
|
|
|
new_events.append(ev)
|
|
|
|
return new_events
|
|
|
|
|
|
|
|
def _find_overlap_requests(self, events):
|
|
|
|
"""We compute a three-element 'row tuple' for each event: (serverid,
|
|
|
|
shnum, row). All elements are ints. The first is a mapping from
|
|
|
|
serverid to group number, the second is a mapping from shnum to
|
|
|
|
subgroup number. The third is a row within the subgroup.
|
|
|
|
|
|
|
|
We also return a list of lists of rowcounts, so renderers can decide
|
|
|
|
how much vertical space to give to each row.
|
|
|
|
"""
|
|
|
|
|
|
|
|
serverid_to_group = {}
|
|
|
|
groupnum_to_rows = {} # maps groupnum to a table of rows. Each table
|
|
|
|
# is a list with an element for each row number
|
|
|
|
# (int starting from 0) that contains a
|
|
|
|
# finish_time, indicating that the row is empty
|
|
|
|
# beyond that time. If finish_time is None, it
|
|
|
|
# indicate a response that has not yet
|
|
|
|
# completed, so the row cannot be reused.
|
|
|
|
new_events = []
|
|
|
|
for ev in events:
|
|
|
|
# DownloadStatus promises to give us events in temporal order
|
|
|
|
ev = ev.copy()
|
2012-06-12 21:01:24 +00:00
|
|
|
ev["serverid"] = ev["server"].get_longname()
|
2011-08-01 18:54:01 +00:00
|
|
|
del ev["server"]
|
2011-06-29 22:25:55 +00:00
|
|
|
if ev["serverid"] not in serverid_to_group:
|
|
|
|
groupnum = len(serverid_to_group)
|
|
|
|
serverid_to_group[ev["serverid"]] = groupnum
|
|
|
|
groupnum = serverid_to_group[ev["serverid"]]
|
|
|
|
if groupnum not in groupnum_to_rows:
|
|
|
|
groupnum_to_rows[groupnum] = []
|
|
|
|
rows = groupnum_to_rows[groupnum]
|
|
|
|
# find an empty slot in the rows
|
|
|
|
free_slot = None
|
|
|
|
for row,finished in enumerate(rows):
|
|
|
|
if finished is not None:
|
|
|
|
if ev["start_time"] > finished:
|
|
|
|
free_slot = row
|
|
|
|
break
|
|
|
|
if free_slot is None:
|
|
|
|
free_slot = len(rows)
|
|
|
|
rows.append(ev["finish_time"])
|
|
|
|
else:
|
|
|
|
rows[free_slot] = ev["finish_time"]
|
|
|
|
ev["row"] = (groupnum, free_slot)
|
|
|
|
new_events.append(ev)
|
|
|
|
# maybe also return serverid_to_group, groupnum_to_rows, and some
|
|
|
|
# indication of the highest finish_time
|
|
|
|
#
|
|
|
|
# actually, return the highest rownum for each groupnum
|
|
|
|
highest_rownums = [len(groupnum_to_rows[groupnum])
|
|
|
|
for groupnum in range(len(serverid_to_group))]
|
|
|
|
return new_events, highest_rownums
|
|
|
|
|
|
|
|
def child_event_json(self, ctx):
|
|
|
|
inevow.IRequest(ctx).setHeader("content-type", "text/plain")
|
|
|
|
data = { } # this will be returned to the GET
|
|
|
|
ds = self.download_status
|
|
|
|
|
2011-11-01 06:18:21 +00:00
|
|
|
data["misc"] = self._find_overlap(ds.misc_events,
|
|
|
|
"start_time", "finish_time")
|
2011-06-29 22:25:55 +00:00
|
|
|
data["read"] = self._find_overlap(ds.read_events,
|
|
|
|
"start_time", "finish_time")
|
|
|
|
data["segment"] = self._find_overlap(ds.segment_events,
|
|
|
|
"start_time", "finish_time")
|
2011-11-01 06:18:21 +00:00
|
|
|
# TODO: overlap on DYHB isn't very useful, and usually gets in the
|
|
|
|
# way. So don't do it.
|
2011-06-29 22:25:55 +00:00
|
|
|
data["dyhb"] = self._find_overlap(ds.dyhb_requests,
|
|
|
|
"start_time", "finish_time")
|
|
|
|
data["block"],data["block_rownums"] = self._find_overlap_requests(ds.block_requests)
|
|
|
|
|
2012-06-12 21:01:24 +00:00
|
|
|
server_info = {} # maps longname to {num,color,short}
|
|
|
|
server_shortnames = {} # maps servernum to shortname
|
|
|
|
for d_ev in ds.dyhb_requests:
|
|
|
|
s = d_ev["server"]
|
|
|
|
longname = s.get_longname()
|
|
|
|
if longname not in server_info:
|
|
|
|
num = len(server_info)
|
|
|
|
server_info[longname] = {"num": num,
|
|
|
|
"color": self.color(s),
|
|
|
|
"short": s.get_name() }
|
|
|
|
server_shortnames[str(num)] = s.get_name()
|
|
|
|
|
|
|
|
data["server_info"] = server_info
|
|
|
|
data["num_serverids"] = len(server_info)
|
2011-06-29 22:25:55 +00:00
|
|
|
# we'd prefer the keys of serverids[] to be ints, but this is JSON,
|
|
|
|
# so they get converted to strings. Stupid javascript.
|
2012-06-12 21:01:24 +00:00
|
|
|
data["serverids"] = server_shortnames
|
2011-06-29 22:26:06 +00:00
|
|
|
data["bounds"] = {"min": ds.first_timestamp, "max": ds.last_timestamp}
|
2010-08-04 07:27:02 +00:00
|
|
|
return simplejson.dumps(data, indent=1) + "\n"
|
|
|
|
|
2011-06-29 22:26:06 +00:00
|
|
|
def render_timeline_link(self, ctx, data):
|
|
|
|
from nevow import url
|
|
|
|
return T.a(href=url.URL.fromContext(ctx).child("timeline"))["timeline"]
|
|
|
|
|
2011-06-29 22:25:55 +00:00
|
|
|
def _rate_and_time(self, bytes, seconds):
|
|
|
|
time_s = self.render_time(None, seconds)
|
|
|
|
if seconds != 0:
|
|
|
|
rate = self.render_rate(None, 1.0 * bytes / seconds)
|
|
|
|
return T.span(title=rate)[time_s]
|
|
|
|
return T.span[time_s]
|
|
|
|
|
2010-08-04 07:27:02 +00:00
|
|
|
def render_events(self, ctx, data):
|
|
|
|
if not self.download_status.storage_index:
|
|
|
|
return
|
|
|
|
srt = self.short_relative_time
|
2011-01-02 03:42:14 +00:00
|
|
|
l = T.div()
|
2011-06-29 22:25:55 +00:00
|
|
|
|
2011-01-02 03:42:14 +00:00
|
|
|
t = T.table(align="left", class_="status-download-events")
|
|
|
|
t[T.tr[T.th["serverid"], T.th["sent"], T.th["received"],
|
|
|
|
T.th["shnums"], T.th["RTT"]]]
|
2011-06-29 22:25:55 +00:00
|
|
|
for d_ev in self.download_status.dyhb_requests:
|
2011-08-01 18:54:01 +00:00
|
|
|
server = d_ev["server"]
|
2011-06-29 22:25:55 +00:00
|
|
|
sent = d_ev["start_time"]
|
|
|
|
shnums = d_ev["response_shnums"]
|
|
|
|
received = d_ev["finish_time"]
|
2010-08-09 22:03:42 +00:00
|
|
|
rtt = None
|
|
|
|
if received is not None:
|
|
|
|
rtt = received - sent
|
|
|
|
if not shnums:
|
2011-01-02 03:42:14 +00:00
|
|
|
shnums = ["-"]
|
2012-06-12 21:01:24 +00:00
|
|
|
t[T.tr(style="background: %s" % self.color(server))[
|
2011-08-01 18:54:01 +00:00
|
|
|
[T.td[server.get_name()], T.td[srt(sent)], T.td[srt(received)],
|
2010-08-04 07:27:02 +00:00
|
|
|
T.td[",".join([str(shnum) for shnum in shnums])],
|
|
|
|
T.td[self.render_time(None, rtt)],
|
|
|
|
]]]
|
2011-06-29 22:25:55 +00:00
|
|
|
|
2011-01-02 03:42:14 +00:00
|
|
|
l[T.h2["DYHB Requests:"], t]
|
|
|
|
l[T.br(clear="all")]
|
2011-06-29 22:25:55 +00:00
|
|
|
|
2011-01-02 03:42:14 +00:00
|
|
|
t = T.table(align="left",class_="status-download-events")
|
|
|
|
t[T.tr[T.th["range"], T.th["start"], T.th["finish"], T.th["got"],
|
|
|
|
T.th["time"], T.th["decrypttime"], T.th["pausedtime"],
|
|
|
|
T.th["speed"]]]
|
2010-08-04 07:27:02 +00:00
|
|
|
for r_ev in self.download_status.read_events:
|
2011-06-29 22:25:55 +00:00
|
|
|
start = r_ev["start"]
|
|
|
|
length = r_ev["length"]
|
|
|
|
bytes = r_ev["bytes_returned"]
|
|
|
|
decrypt_time = ""
|
|
|
|
if bytes:
|
|
|
|
decrypt_time = self._rate_and_time(bytes, r_ev["decrypt_time"])
|
|
|
|
speed, rtt = "",""
|
|
|
|
if r_ev["finish_time"] is not None:
|
|
|
|
rtt = r_ev["finish_time"] - r_ev["start_time"] - r_ev["paused_time"]
|
2010-08-15 14:19:33 +00:00
|
|
|
speed = self.render_rate(None, compute_rate(bytes, rtt))
|
2010-08-04 07:27:02 +00:00
|
|
|
rtt = self.render_time(None, rtt)
|
2011-06-29 22:25:55 +00:00
|
|
|
paused = self.render_time(None, r_ev["paused_time"])
|
|
|
|
|
2010-08-04 07:27:02 +00:00
|
|
|
t[T.tr[T.td["[%d:+%d]" % (start, length)],
|
2011-06-29 22:25:55 +00:00
|
|
|
T.td[srt(r_ev["start_time"])], T.td[srt(r_ev["finish_time"])],
|
|
|
|
T.td[bytes], T.td[rtt],
|
|
|
|
T.td[decrypt_time], T.td[paused],
|
2010-08-04 07:27:02 +00:00
|
|
|
T.td[speed],
|
|
|
|
]]
|
2011-06-29 22:25:55 +00:00
|
|
|
|
2011-01-02 03:42:14 +00:00
|
|
|
l[T.h2["Read Events:"], t]
|
|
|
|
l[T.br(clear="all")]
|
2011-06-29 22:25:55 +00:00
|
|
|
|
2011-01-02 03:42:14 +00:00
|
|
|
t = T.table(align="left",class_="status-download-events")
|
2011-06-29 22:25:55 +00:00
|
|
|
t[T.tr[T.th["segnum"], T.th["start"], T.th["active"], T.th["finish"],
|
|
|
|
T.th["range"],
|
2011-01-02 03:42:14 +00:00
|
|
|
T.th["decodetime"], T.th["segtime"], T.th["speed"]]]
|
2010-08-04 07:27:02 +00:00
|
|
|
for s_ev in self.download_status.segment_events:
|
2011-06-29 22:25:55 +00:00
|
|
|
range_s = "-"
|
|
|
|
segtime_s = "-"
|
|
|
|
speed = "-"
|
|
|
|
decode_time = "-"
|
|
|
|
if s_ev["finish_time"] is not None:
|
|
|
|
if s_ev["success"]:
|
|
|
|
segtime = s_ev["finish_time"] - s_ev["active_time"]
|
|
|
|
segtime_s = self.render_time(None, segtime)
|
|
|
|
seglen = s_ev["segment_length"]
|
|
|
|
range_s = "[%d:+%d]" % (s_ev["segment_start"], seglen)
|
2010-08-15 14:19:33 +00:00
|
|
|
speed = self.render_rate(None, compute_rate(seglen, segtime))
|
2011-06-29 22:25:55 +00:00
|
|
|
decode_time = self._rate_and_time(seglen, s_ev["decode_time"])
|
2010-08-04 07:27:02 +00:00
|
|
|
else:
|
2011-06-29 22:25:55 +00:00
|
|
|
# error
|
|
|
|
range_s = "error"
|
|
|
|
else:
|
|
|
|
# not finished yet
|
|
|
|
pass
|
|
|
|
|
|
|
|
t[T.tr[T.td["seg%d" % s_ev["segment_number"]],
|
|
|
|
T.td[srt(s_ev["start_time"])],
|
|
|
|
T.td[srt(s_ev["active_time"])],
|
|
|
|
T.td[srt(s_ev["finish_time"])],
|
|
|
|
T.td[range_s],
|
|
|
|
T.td[decode_time],
|
|
|
|
T.td[segtime_s], T.td[speed]]]
|
|
|
|
|
2011-01-02 03:42:14 +00:00
|
|
|
l[T.h2["Segment Events:"], t]
|
|
|
|
l[T.br(clear="all")]
|
|
|
|
t = T.table(align="left",class_="status-download-events")
|
|
|
|
t[T.tr[T.th["serverid"], T.th["shnum"], T.th["range"],
|
2011-06-29 22:25:55 +00:00
|
|
|
T.th["txtime"], T.th["rxtime"],
|
|
|
|
T.th["received"], T.th["RTT"]]]
|
|
|
|
for r_ev in self.download_status.block_requests:
|
2011-08-01 18:53:44 +00:00
|
|
|
server = r_ev["server"]
|
2010-08-04 07:27:02 +00:00
|
|
|
rtt = None
|
2011-06-29 22:25:55 +00:00
|
|
|
if r_ev["finish_time"] is not None:
|
|
|
|
rtt = r_ev["finish_time"] - r_ev["start_time"]
|
2012-06-12 21:01:24 +00:00
|
|
|
color = self.color(server)
|
2011-08-01 18:53:44 +00:00
|
|
|
t[T.tr(style="background: %s" % color)[
|
|
|
|
T.td[server.get_name()], T.td[r_ev["shnum"]],
|
2011-06-29 22:25:55 +00:00
|
|
|
T.td["[%d:+%d]" % (r_ev["start"], r_ev["length"])],
|
|
|
|
T.td[srt(r_ev["start_time"])], T.td[srt(r_ev["finish_time"])],
|
|
|
|
T.td[r_ev["response_length"] or ""],
|
2010-08-04 07:27:02 +00:00
|
|
|
T.td[self.render_time(None, rtt)],
|
|
|
|
]]
|
2011-06-29 22:25:55 +00:00
|
|
|
|
2011-01-02 03:42:14 +00:00
|
|
|
l[T.h2["Requests:"], t]
|
|
|
|
l[T.br(clear="all")]
|
2010-08-04 07:27:02 +00:00
|
|
|
|
|
|
|
return l
|
|
|
|
|
2012-06-12 21:01:24 +00:00
|
|
|
def color(self, server):
|
|
|
|
peerid = server.get_serverid() # binary
|
2010-08-04 07:27:02 +00:00
|
|
|
def m(c):
|
|
|
|
return min(ord(c) / 2 + 0x80, 0xff)
|
|
|
|
return "#%02x%02x%02x" % (m(peerid[0]), m(peerid[1]), m(peerid[2]))
|
|
|
|
|
2008-03-05 21:59:56 +00:00
|
|
|
def render_results(self, ctx, data):
|
|
|
|
d = self.download_results()
|
|
|
|
def _got_results(results):
|
|
|
|
if results:
|
|
|
|
return ctx.tag
|
|
|
|
return ""
|
|
|
|
d.addCallback(_got_results)
|
|
|
|
return d
|
|
|
|
|
|
|
|
def render_started(self, ctx, data):
|
|
|
|
TIME_FORMAT = "%H:%M:%S %d-%b-%Y"
|
|
|
|
started_s = time.strftime(TIME_FORMAT,
|
|
|
|
time.localtime(data.get_started()))
|
2010-08-04 07:27:02 +00:00
|
|
|
return started_s + " (%s)" % data.get_started()
|
2008-03-05 21:59:56 +00:00
|
|
|
|
|
|
|
def render_si(self, ctx, data):
|
|
|
|
si_s = base32.b2a_or_none(data.get_storage_index())
|
|
|
|
if si_s is None:
|
|
|
|
si_s = "(None)"
|
|
|
|
return si_s
|
|
|
|
|
|
|
|
def render_helper(self, ctx, data):
|
|
|
|
return {True: "Yes",
|
|
|
|
False: "No"}[data.using_helper()]
|
|
|
|
|
|
|
|
def render_total_size(self, ctx, data):
|
|
|
|
size = data.get_size()
|
|
|
|
if size is None:
|
2008-05-07 20:53:58 +00:00
|
|
|
return "(unknown)"
|
2008-03-05 21:59:56 +00:00
|
|
|
return size
|
|
|
|
|
|
|
|
def render_progress(self, ctx, data):
|
|
|
|
progress = data.get_progress()
|
2011-06-29 22:26:06 +00:00
|
|
|
# TODO: make an ascii-art bar
|
|
|
|
return "%.1f%%" % (100.0 * progress)
|
|
|
|
|
|
|
|
def render_status(self, ctx, data):
|
|
|
|
return data.get_status()
|
|
|
|
|
|
|
|
class DownloadStatusTimelinePage(rend.Page):
|
|
|
|
docFactory = getxmlfile("download-status-timeline.xhtml")
|
|
|
|
|
|
|
|
def render_started(self, ctx, data):
|
|
|
|
TIME_FORMAT = "%H:%M:%S %d-%b-%Y"
|
|
|
|
started_s = time.strftime(TIME_FORMAT,
|
|
|
|
time.localtime(data.get_started()))
|
|
|
|
return started_s + " (%s)" % data.get_started()
|
|
|
|
|
|
|
|
def render_si(self, ctx, data):
|
|
|
|
si_s = base32.b2a_or_none(data.get_storage_index())
|
|
|
|
if si_s is None:
|
|
|
|
si_s = "(None)"
|
|
|
|
return si_s
|
|
|
|
|
|
|
|
def render_helper(self, ctx, data):
|
|
|
|
return {True: "Yes",
|
|
|
|
False: "No"}[data.using_helper()]
|
|
|
|
|
|
|
|
def render_total_size(self, ctx, data):
|
|
|
|
size = data.get_size()
|
|
|
|
if size is None:
|
|
|
|
return "(unknown)"
|
|
|
|
return size
|
|
|
|
|
|
|
|
def render_progress(self, ctx, data):
|
|
|
|
progress = data.get_progress()
|
2008-03-05 21:59:56 +00:00
|
|
|
# TODO: make an ascii-art bar
|
|
|
|
return "%.1f%%" % (100.0 * progress)
|
|
|
|
|
|
|
|
def render_status(self, ctx, data):
|
|
|
|
return data.get_status()
|
|
|
|
|
|
|
|
class RetrieveStatusPage(rend.Page, RateAndTimeMixin):
|
|
|
|
docFactory = getxmlfile("retrieve-status.xhtml")
|
|
|
|
|
|
|
|
def __init__(self, data):
|
|
|
|
rend.Page.__init__(self, data)
|
|
|
|
self.retrieve_status = data
|
|
|
|
|
|
|
|
def render_started(self, ctx, data):
|
|
|
|
TIME_FORMAT = "%H:%M:%S %d-%b-%Y"
|
|
|
|
started_s = time.strftime(TIME_FORMAT,
|
|
|
|
time.localtime(data.get_started()))
|
|
|
|
return started_s
|
|
|
|
|
|
|
|
def render_si(self, ctx, data):
|
|
|
|
si_s = base32.b2a_or_none(data.get_storage_index())
|
|
|
|
if si_s is None:
|
|
|
|
si_s = "(None)"
|
|
|
|
return si_s
|
|
|
|
|
|
|
|
def render_helper(self, ctx, data):
|
|
|
|
return {True: "Yes",
|
|
|
|
False: "No"}[data.using_helper()]
|
|
|
|
|
|
|
|
def render_current_size(self, ctx, data):
|
|
|
|
size = data.get_size()
|
|
|
|
if size is None:
|
|
|
|
size = "(unknown)"
|
|
|
|
return size
|
|
|
|
|
|
|
|
def render_progress(self, ctx, data):
|
|
|
|
progress = data.get_progress()
|
|
|
|
# TODO: make an ascii-art bar
|
|
|
|
return "%.1f%%" % (100.0 * progress)
|
|
|
|
|
|
|
|
def render_status(self, ctx, data):
|
|
|
|
return data.get_status()
|
|
|
|
|
|
|
|
def render_encoding(self, ctx, data):
|
|
|
|
k, n = data.get_encoding()
|
|
|
|
return ctx.tag["Encoding: %s of %s" % (k, n)]
|
|
|
|
|
|
|
|
def render_problems(self, ctx, data):
|
IServer refactoring: pass IServer instances around, instead of peerids
refs #1363
This collapses 88 small incremental changes (each of which passes all tests)
into one big patch. The development process for the long path started with
adding some temporary scaffolding, changing one method at a time, then
removing the scaffolding. The individual pieces are as follows, in reverse
chronological order (the first patch is at the end of this comment):
commit 9bbe4174fd0d98a6cf47a8ef96e85d9ef34b2f9a
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 16:05:00 2011 -0400
immutable/downloader/status.py: correct comment
src/allmydata/immutable/downloader/status.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
commit 72146a7c7c91eac2f7c3ceb801eb7a1721376889
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 15:46:20 2011 -0400
remove temporary ServerMap._storage_broker
src/allmydata/mutable/checker.py | 2 +-
src/allmydata/mutable/filenode.py | 2 +-
src/allmydata/mutable/publish.py | 2 +-
src/allmydata/mutable/servermap.py | 5 ++---
src/allmydata/test/test_mutable.py | 8 ++++----
5 files changed, 9 insertions(+), 10 deletions(-)
commit d703096b41632c47d76414b12672e076a422ff5c
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 15:37:05 2011 -0400
remove temporary storage_broker.get_server_for_id()
src/allmydata/storage_client.py | 3 ---
src/allmydata/test/no_network.py | 13 -------------
2 files changed, 0 insertions(+), 16 deletions(-)
commit 620cc5d80882ef6f7decfd26af8a6c7c1ddf80d1
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 12:50:06 2011 -0400
API of Retrieve._try_to_validate_privkey(), trying to remove reader.server
src/allmydata/mutable/retrieve.py | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
commit 92f43f856f4a8b36c207d1b190ed8699b5a4ecb4
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 12:48:08 2011 -0400
API of Retrieve._validate_block(), trying to remove reader.server
src/allmydata/mutable/retrieve.py | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
commit 572d5070761861a2190349d1ed8d85dbc25698a5
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 12:36:58 2011 -0400
API of Retrieve._mark_bad_share(), trying to remove reader.server
src/allmydata/mutable/retrieve.py | 21 +++++++++------------
1 files changed, 9 insertions(+), 12 deletions(-)
commit a793ff00c0de1e2eec7b46288fdf388c7a2bec89
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 12:06:13 2011 -0400
remove now-unused get_rref_for_serverid()
src/allmydata/mutable/servermap.py | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
commit 1b9827cc9366bf90b93297fdd6832f2ad0480ce7
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 12:03:09 2011 -0400
Retrieve: stop adding .serverid attributes to readers
src/allmydata/mutable/retrieve.py | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
commit 5d4e9d491b19e49d2e443a1dfff2c672842c36ef
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 12:03:34 2011 -0400
return value of Retrieve(verify=True)
src/allmydata/mutable/checker.py | 11 ++++++-----
src/allmydata/mutable/retrieve.py | 3 +--
2 files changed, 7 insertions(+), 7 deletions(-)
commit e9ab7978c384e1f677cb7779dc449b1044face82
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:54:23 2011 -0400
Retrieve._bad_shares (but not return value, used by Verifier)
src/allmydata/mutable/retrieve.py | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
commit 2d91926de233ec5c881f30e36b4a30ad92ab42a9
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:51:23 2011 -0400
Publish: stop adding .serverid attributes to writers
src/allmydata/mutable/publish.py | 9 ++-------
1 files changed, 2 insertions(+), 7 deletions(-)
commit 47c7a0105dec7cbf4f7e0a3ce800bbb85b15df4a
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:56:33 2011 -0400
API of get_write_enabler()
src/allmydata/mutable/filenode.py | 7 ++++---
src/allmydata/mutable/publish.py | 4 ++--
src/allmydata/test/no_network.py | 3 +++
3 files changed, 9 insertions(+), 5 deletions(-)
commit 9196a5c6590fdbfd660325ea8358b345887d3db0
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:46:24 2011 -0400
API of get_(renewal|cancel)_secret()
src/allmydata/mutable/filenode.py | 14 ++++++++------
src/allmydata/mutable/publish.py | 8 ++++----
src/allmydata/mutable/servermap.py | 5 ++---
3 files changed, 14 insertions(+), 13 deletions(-)
commit de7c1552f8c163eff5b6d820b5fb3b21c1b47cb5
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:41:52 2011 -0400
API of CorruptShareError. Also comment out some related+unused test_web.py code
src/allmydata/mutable/common.py | 13 +++++--------
src/allmydata/mutable/retrieve.py | 10 +++++-----
src/allmydata/mutable/servermap.py | 8 +++-----
src/allmydata/test/common.py | 13 ++++++++-----
4 files changed, 21 insertions(+), 23 deletions(-)
commit 2c1c314046b620c16f1e66d030c150d768b7d01e
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 12:01:46 2011 -0400
API of ServerMap.mark_bad_share()
src/allmydata/mutable/publish.py | 2 +-
src/allmydata/mutable/retrieve.py | 6 +++---
src/allmydata/mutable/servermap.py | 6 ++----
src/allmydata/test/test_mutable.py | 3 +--
4 files changed, 7 insertions(+), 10 deletions(-)
commit 1bed349030779fd0c378ae4e821384f953c6f6ff
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:11:17 2011 -0400
API+name of ServerMap.shares_on_server() : only for tests, so debug_ prefix
src/allmydata/mutable/servermap.py | 7 ++-----
src/allmydata/test/test_mutable.py | 6 +++---
2 files changed, 5 insertions(+), 8 deletions(-)
commit 2d32e448677d6b818692e801045d4115b29abf21
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:07:10 2011 -0400
API of ServerMap.all_servers_for_version()
src/allmydata/mutable/servermap.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
commit 48f3204d1889c3e7179578125c4bdef515af3d6a
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:04:50 2011 -0400
internals of ServerMap methods that use make_versionmap(), remove temp copy
src/allmydata/mutable/servermap.py | 28 +++++++++----------------
1 files changed, 10 insertions(+), 18 deletions(-)
commit 5c3da77b6c777a145bd5ddfaa4db849dc9495548
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:01:28 2011 -0400
API of ServerMap.make_versionmap()
src/allmydata/mutable/checker.py | 4 ++--
src/allmydata/mutable/retrieve.py | 5 ++---
src/allmydata/mutable/servermap.py | 4 ++--
src/allmydata/test/test_mutable.py | 7 ++++---
4 files changed, 10 insertions(+), 10 deletions(-)
commit b6882ece49afb4c507d118af2db346fa329209dc
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 10:53:38 2011 -0400
make a copy of ServerMap.make_versionmap() (_make_versionmap2) for internal use
src/allmydata/mutable/servermap.py | 18 +++++++++++++-----
1 files changed, 13 insertions(+), 5 deletions(-)
commit 963f8e63faf32b950eb1b8103cd2ff16fe8f0151
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:45:58 2011 -0400
API of RetrieveStatus.add_problem()
src/allmydata/mutable/retrieve.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
commit 4976d29ffae565a048851601c29013bbae2976d8
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:45:05 2011 -0400
API of RetrieveStatus.add_fetch_timing()
src/allmydata/mutable/retrieve.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
commit d057d3bbba72663ee148a8b916bc2d52be2e3982
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:44:04 2011 -0400
API of Retrieve.notify_server_corruption()
src/allmydata/mutable/retrieve.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
commit 8a2a81e46671c860610e0e96d6add1a57551f22d
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:42:32 2011 -0400
remove unused _outstanding_queries
src/allmydata/mutable/retrieve.py | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
commit 56d12cc9968d03ccd53764455c671122c4f391d1
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:40:57 2011 -0400
change Retrieve.remaining_sharemap
src/allmydata/mutable/retrieve.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
commit 4f0b7af4821f43290bfc70f2b1fc30149ad81281
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 10:40:18 2011 -0400
accessor for PublishStatus._problems
src/allmydata/mutable/publish.py | 4 +++-
src/allmydata/web/status.py | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
commit 627087cf66d0b8cc519f4d551a967a7bd9b6a741
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 10:36:39 2011 -0400
accessor for RetrieveStatus._problems
src/allmydata/mutable/retrieve.py | 8 ++++++--
src/allmydata/web/status.py | 2 +-
2 files changed, 7 insertions(+), 3 deletions(-)
commit ca7dea81f03801b1c7353fc00ecba689268109cf
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:35:32 2011 -0400
add .server to "reader", so we can get at it later
src/allmydata/mutable/retrieve.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
commit 6ef516e24908ec195af084a7550d1921a5e983b0
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:32:32 2011 -0400
temporarily give Retrieve a _storage_broker, so it can map serverids to servers
src/allmydata/mutable/checker.py | 3 ++-
src/allmydata/mutable/filenode.py | 6 ++++--
src/allmydata/mutable/retrieve.py | 5 +++--
src/allmydata/test/test_mutable.py | 4 ++--
4 files changed, 11 insertions(+), 7 deletions(-)
commit afe08e4dd3f4ff9ff7e8a2a8d28b181e3625bcc9
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:21:51 2011 -0400
mutable/retrieve.py: s/peer/server/
src/allmydata/mutable/retrieve.py | 82 +++++++++++++-------------
src/allmydata/test/test_mutable.py | 6 +-
2 files changed, 44 insertions(+), 44 deletions(-)
commit 910afcb5d7f274880f68dd6cdb5b05f2bbc29adc
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:16:01 2011 -0400
web.status.PublishStatusPage: add comment, I think .problems isn't exercised
src/allmydata/web/status.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
commit 311466dd8c931bbba40d590ade867704282e7f1a
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:48:16 2011 -0400
API of PublishStatus.add_per_server_time()
src/allmydata/mutable/publish.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
commit 2df5faa1b6cbfbaded520d2320305a62fe961118
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:46:37 2011 -0400
more simplifications
src/allmydata/mutable/publish.py | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
commit 6ac4544a3da385f2aad9392f906b90192f4f919a
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:44:08 2011 -0400
API of ServerMap.version_on_server()
src/allmydata/mutable/publish.py | 2 +-
src/allmydata/mutable/servermap.py | 4 ++--
src/allmydata/test/test_mutable.py | 5 ++---
3 files changed, 5 insertions(+), 6 deletions(-)
commit 3e187e322511072e4683329df6b2c6c733a66dba
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:16:32 2011 -0400
API of ServerMap.make_sharemap()
src/allmydata/mutable/servermap.py | 4 ++--
src/allmydata/test/test_mutable.py | 7 ++++---
src/allmydata/web/status.py | 4 ++--
3 files changed, 8 insertions(+), 7 deletions(-)
commit 318feed8437bdd8d4943c6569d38f7b54b6313cc
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:36:19 2011 -0400
small cleanups
src/allmydata/mutable/publish.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
commit bd459ed5714e1db5a7163935c54b7b0b56db8349
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:33:39 2011 -0400
API of ServerMap.add_new_share()
src/allmydata/mutable/publish.py | 4 ++--
src/allmydata/mutable/servermap.py | 6 ++----
2 files changed, 4 insertions(+), 6 deletions(-)
commit f2804fb6ed11d80088e0da8ed48e6c2922f2ffef
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:30:26 2011 -0400
API of ServerMap.get_bad_shares()
src/allmydata/mutable/publish.py | 3 +--
src/allmydata/mutable/servermap.py | 9 ++++-----
2 files changed, 5 insertions(+), 7 deletions(-)
commit 965074a47b3ce1431cb46d9a233840afcf9105f5
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:26:58 2011 -0400
more small cleanups
src/allmydata/mutable/publish.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
commit 38020da34f034f8889947dd3dc05e087ffff7106
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:18:47 2011 -0400
change Publish.bad_share_checkstrings
src/allmydata/mutable/publish.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
commit 5efebcbd2ee0c2f299ea86f7591d856c0f265304
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:16:31 2011 -0400
change internals of Publish.update_goal()
src/allmydata/mutable/publish.py | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
commit e91b55ff4c2a69165b71f2c7b217ac319ff4c527
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:11:42 2011 -0400
get rid of Publish.connections
src/allmydata/mutable/publish.py | 27 +++++----------------------
1 files changed, 5 insertions(+), 22 deletions(-)
commit 64e9a53b3229ebe2f9ebf7ed502d539311d0e037
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:05:32 2011 -0400
change Publish.bad_servers
src/allmydata/mutable/publish.py | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
commit b85a934bef315a06bcfe00c9c12a3627fed2b918
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:03:07 2011 -0400
Publish.bad_servers: fix bug, this should be a set of serverids, not writers
src/allmydata/mutable/publish.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
commit 605ea15ec15ed671513819003ccd211cdb9761e0
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:00:21 2011 -0400
change .placed
src/allmydata/mutable/publish.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
commit f7aba37b1b345d5b6d5cb16e3b3f6f3c1afb658e
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 22:59:22 2011 -0400
temporarily stash IServer as .server on the "writer" object
src/allmydata/mutable/publish.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
commit f9b551d788e7db1f187fce5ab98ab5d5fe4e1c36
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 22:48:18 2011 -0400
change Publish.goal and API of log_goal() to use IServer, not serverid
src/allmydata/mutable/publish.py | 48 ++++++++++++++--------------
1 files changed, 24 insertions(+), 24 deletions(-)
commit 75f20616558e4900b8b1f685dd99aa838de6d452
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:27:02 2011 -0400
API of ServerMap.get_known_shares()
src/allmydata/mutable/publish.py | 16 ++++++++++------
src/allmydata/mutable/servermap.py | 7 ++-----
2 files changed, 12 insertions(+), 11 deletions(-)
commit 1c38c9d37bb08221b4418762234b1a62397b3b4b
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:20:29 2011 -0400
Publish.full_serverlist
src/allmydata/mutable/publish.py | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
commit b6cbd215a04b9cde31a7d92a97a7f048622b16f1
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:12:31 2011 -0400
API of ServerMap.all_servers()
src/allmydata/mutable/servermap.py | 19 ++++++-------------
1 files changed, 6 insertions(+), 13 deletions(-)
commit e63cd0315fae65357b1727ec6d5ff3c6e0d27c98
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:10:18 2011 -0400
remove ServerMap.connections, set_rref_for_serverid()
src/allmydata/mutable/servermap.py | 11 +----------
1 files changed, 1 insertions(+), 10 deletions(-)
commit 4df52db2f80eb12eefa5d57103c24893cde89553
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:04:06 2011 -0400
API of ServerMap.mark_server_reachable()
src/allmydata/mutable/servermap.py | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
commit 69c715bde77944dc25181b3dbbeb042c816f9a1b
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:03:21 2011 -0400
API of ServerMap.mark_server_unreachable()
src/allmydata/mutable/servermap.py | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
commit 3d784d60eec1c508858e3a617e4411ffbcc3c1fa
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:02:03 2011 -0400
API of status.set_privkey_from()
src/allmydata/mutable/servermap.py | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
commit 544ed3ea29bed7e66da7fd29ca3f6f076f27a9e6
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:01:15 2011 -0400
API of status.add_per_server_time()
src/allmydata/mutable/servermap.py | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
commit fffe5008b6320bd1e04c3c68389a2bf2ee383fa8
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:59:02 2011 -0400
remove unused .versionmap
src/allmydata/mutable/servermap.py | 7 -------
1 files changed, 0 insertions(+), 7 deletions(-)
commit 2816562e090d2294179db3588dafcca18de1bc2b
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:57:51 2011 -0400
remove serverid from all log messages. Also one unused lambda.
src/allmydata/mutable/servermap.py | 30 +++++++++++++-------------
1 files changed, 15 insertions(+), 15 deletions(-)
commit 28fa6b1a2738fa98c1f1dbd3d0e01ae98912d11f
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:54:30 2011 -0400
removed unused _readers
src/allmydata/mutable/servermap.py | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
commit a8e4ed3d645ab592d1add6a1e69b6d1ebfb77817
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:54:16 2011 -0400
remove unused _sharemap
src/allmydata/mutable/servermap.py | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
commit 3f072e55cf1d0700f9fffe23f8f3a475725df588
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:49:03 2011 -0400
_must_query
src/allmydata/mutable/servermap.py | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
commit c599a059b8df3f5785e4bf89fb6ecc6d8dcd708b
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:48:05 2011 -0400
_queries_outstanding
src/allmydata/mutable/servermap.py | 16 +++++++---------
1 files changed, 7 insertions(+), 9 deletions(-)
commit 7743759f98ac2c07926b2fdbd80bf52dfab33085
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:46:17 2011 -0400
_empty_servers
src/allmydata/mutable/servermap.py | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
commit 6bb1825916828a713a32cdf7f7411fa3ea2e1e5d
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:45:39 2011 -0400
_good_servers
src/allmydata/mutable/servermap.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
commit 1768fab1b51d8dd93ecabbaaabfadfa20cf6c3d4
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:44:59 2011 -0400
_bad_servers
src/allmydata/mutable/servermap.py | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
commit dccbaef30f0ba714c746bf6d4a1a803c36e17b65
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:41:54 2011 -0400
API of _try_to_set_pubkey()
src/allmydata/mutable/servermap.py | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
commit 0481ea70042ba3575f15eac7fd0780f8ece580cc
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:35:02 2011 -0400
API of notify_server_corruption()
src/allmydata/mutable/servermap.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
commit bea9cba18fb3b9c11bb22f18356a263ecec7351e
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:34:09 2011 -0400
API of _got_signature_one_share()
src/allmydata/mutable/servermap.py | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
commit 1520123583cf78650706e114b15bb5b0ac1f4a14
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:32:33 2011 -0400
API of _try_to_validate_privkey()
src/allmydata/mutable/servermap.py | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
commit 938852c9c8519c7a078f58a9b1f4dd8ec8b6715e
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:31:48 2011 -0400
API and internals of _add_lease_failed()
src/allmydata/mutable/servermap.py | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
commit 3843dba367e3c19e176a622ab853cb51d2472ddf
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:30:37 2011 -0400
API of _privkey_query_failed()
src/allmydata/mutable/servermap.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
commit 2219a710e1633cd57d0ca0786490de87b3e19ba7
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:29:43 2011 -0400
fix bug in call to _privkey_query_failed, unrelated to refactoring
src/allmydata/mutable/servermap.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
commit ae615bec7d0d1b269710b6902797b12f9592ad62
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:27:17 2011 -0400
API of _got_corrupt_share()
src/allmydata/mutable/servermap.py | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)
commit cb51c95a6f4e077278157a77dab060c8c1ad7a81
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:23:16 2011 -0400
API of _got_results()
src/allmydata/mutable/servermap.py | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
commit bac9154fe0af18f226999a58ffc2362d8cf4b802
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:19:19 2011 -0400
API of _query_failed()
src/allmydata/mutable/servermap.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
commit fdc29a8ca95d4b5c503e5382b9e5d4d02141ba12
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:17:20 2011 -0400
API of _do_read()
src/allmydata/mutable/servermap.py | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
commit e7e9e338f28d004aa4d423d11c65f1e271ac7322
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:20:21 2011 -0400
API of _do_query()
src/allmydata/mutable/servermap.py | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
commit 330625b9dac4cdbe72a11464a893065b9aeed453
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:43:05 2011 -0400
next step: first batch of updates to ServermapUpdater
updates:
most method-local variables in update()
API of _build_initial_querylist()
API of _send_initial_requests()
.full_serverlist
.extra_servers
src/allmydata/mutable/servermap.py | 39 ++++++++++++++------------
1 files changed, 21 insertions(+), 18 deletions(-)
commit 4aadc584fa7dcb2daa86b048c81dee0049ba26d9
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:07:00 2011 -0400
internal change: index _bad_shares with IServer
src/allmydata/mutable/servermap.py | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
commit 16d4e6fa82a9907dbdc92094213387c6a4164e41
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:20:47 2011 +0100
internal change: index _known_shares with IServer instead of serverid
callers are unchanged
src/allmydata/mutable/servermap.py | 42 +++++++++++++++----------
1 files changed, 25 insertions(+), 17 deletions(-)
commit ceeb5f4938cc814a0c75d1b8f4018aed965c2176
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:11:43 2011 +0100
accessors and name cleanup for servermap.Servermap.last_update_mode/time
src/allmydata/mutable/filenode.py | 6 +++---
src/allmydata/mutable/publish.py | 4 ++--
src/allmydata/mutable/servermap.py | 17 +++++++++++------
3 files changed, 16 insertions(+), 11 deletions(-)
commit 8d3cbda82661c0a7e5c3d3b65cf7a5d5ab7e32c0
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:11:14 2011 +0100
accessors and name cleanup for servermap.Servermap.problems
src/allmydata/mutable/servermap.py | 21 +++++++++++++--------
src/allmydata/test/test_mutable.py | 6 +++---
2 files changed, 16 insertions(+), 11 deletions(-)
commit 348f57988f79389db0aab7672e6eaa9a6d8e3219
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:10:41 2011 +0100
accessors and name cleanup for servermap.Servermap.bad_shares
src/allmydata/mutable/publish.py | 2 +-
src/allmydata/mutable/servermap.py | 30 ++++++++++++++-----------
2 files changed, 18 insertions(+), 14 deletions(-)
commit 520c9368134673cdf76c653c5e1bb91c2ab5d51e
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:10:05 2011 +0100
accessors and name cleanup for servermap.Servermap.servermap .
src/allmydata/mutable/publish.py | 14 +++++----
src/allmydata/mutable/servermap.py | 38 ++++++++++++++-----------
2 files changed, 29 insertions(+), 23 deletions(-)
commit b8b8dc38287a91dbdf494426ac801d9381ce5841
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:08:02 2011 +0100
fix reachable_servers
src/allmydata/mutable/checker.py | 3 ++-
src/allmydata/mutable/publish.py | 4 +++-
src/allmydata/mutable/servermap.py | 12 ++++++++++--
3 files changed, 15 insertions(+), 4 deletions(-)
commit cb0cfd1adfefad357c187aaaf690c3df68b622bc
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:06:03 2011 +0100
fix Servermap.unreachable_servers
src/allmydata/mutable/servermap.py | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
commit 2d9ea79b94bd4db674d40386fda90825785ac495
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:03:48 2011 +0100
give ServerMap a StorageFarmBroker, temporary
this makes it possible for the ServerMap to accept bare serverids and still
build data structures with IServers
src/allmydata/mutable/checker.py | 2 +-
src/allmydata/mutable/filenode.py | 2 +-
src/allmydata/mutable/publish.py | 2 +-
src/allmydata/mutable/servermap.py | 5 +++--
src/allmydata/test/test_mutable.py | 8 ++++----
5 files changed, 10 insertions(+), 9 deletions(-)
commit 718d1aeff6fded893f65397806d22ece928b0dd4
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 13:43:30 2011 -0400
add StorageFarmBroker.get_server_for_id(), temporary helper
This will go away once we're passing IServers everywhere.
src/allmydata/storage_client.py | 2 ++
src/allmydata/test/no_network.py | 13 +++++++++++++
2 files changed, 15 insertions(+), 0 deletions(-)
commit ece20231d7fda0d503704842a4aa068dfbc2e54e
Author: Brian Warner <warner@lothar.com>
Date: Sun Oct 2 01:11:50 2011 +0100
add proper accessors for Servermap.connections, to make refactoring easier
src/allmydata/mutable/publish.py | 6 +++---
src/allmydata/mutable/retrieve.py | 10 +++++-----
src/allmydata/mutable/servermap.py | 17 +++++++++++------
3 files changed, 19 insertions(+), 14 deletions(-)
commit 3b943d6bf302ff702668081a612fc4fe2604cf9c
Author: Brian Warner <warner@lothar.com>
Date: Fri Sep 23 10:34:30 2011 -0700
mutable/servermap.py and neighbors: s/peer/server/
src/allmydata/mutable/checker.py | 22 +-
src/allmydata/mutable/publish.py | 204 +++++++-------
src/allmydata/mutable/servermap.py | 402 +++++++++++++-------------
src/allmydata/test/test_mutable.py | 18 +-
4 files changed, 323 insertions(+), 323 deletions(-)
IServer refactoring: pass IServer instances around, instead of peerids
refs #1363
This collapses 88 small incremental changes (each of which passes all tests)
into one big patch. The development process for the long path started with
adding some temporary scaffolding, changing one method at a time, then
removing the scaffolding. The individual pieces are as follows, in reverse
chronological order (the first patch is at the end of this comment):
commit 9bbe4174fd0d98a6cf47a8ef96e85d9ef34b2f9a
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 16:05:00 2011 -0400
immutable/downloader/status.py: correct comment
src/allmydata/immutable/downloader/status.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
commit 72146a7c7c91eac2f7c3ceb801eb7a1721376889
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 15:46:20 2011 -0400
remove temporary ServerMap._storage_broker
src/allmydata/mutable/checker.py | 2 +-
src/allmydata/mutable/filenode.py | 2 +-
src/allmydata/mutable/publish.py | 2 +-
src/allmydata/mutable/servermap.py | 5 ++---
src/allmydata/test/test_mutable.py | 8 ++++----
5 files changed, 9 insertions(+), 10 deletions(-)
commit d703096b41632c47d76414b12672e076a422ff5c
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 15:37:05 2011 -0400
remove temporary storage_broker.get_server_for_id()
src/allmydata/storage_client.py | 3 ---
src/allmydata/test/no_network.py | 13 -------------
2 files changed, 0 insertions(+), 16 deletions(-)
commit 620cc5d80882ef6f7decfd26af8a6c7c1ddf80d1
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 12:50:06 2011 -0400
API of Retrieve._try_to_validate_privkey(), trying to remove reader.server
src/allmydata/mutable/retrieve.py | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
commit 92f43f856f4a8b36c207d1b190ed8699b5a4ecb4
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 12:48:08 2011 -0400
API of Retrieve._validate_block(), trying to remove reader.server
src/allmydata/mutable/retrieve.py | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
commit 572d5070761861a2190349d1ed8d85dbc25698a5
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 12:36:58 2011 -0400
API of Retrieve._mark_bad_share(), trying to remove reader.server
src/allmydata/mutable/retrieve.py | 21 +++++++++------------
1 files changed, 9 insertions(+), 12 deletions(-)
commit a793ff00c0de1e2eec7b46288fdf388c7a2bec89
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 12:06:13 2011 -0400
remove now-unused get_rref_for_serverid()
src/allmydata/mutable/servermap.py | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
commit 1b9827cc9366bf90b93297fdd6832f2ad0480ce7
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 12:03:09 2011 -0400
Retrieve: stop adding .serverid attributes to readers
src/allmydata/mutable/retrieve.py | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
commit 5d4e9d491b19e49d2e443a1dfff2c672842c36ef
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 12:03:34 2011 -0400
return value of Retrieve(verify=True)
src/allmydata/mutable/checker.py | 11 ++++++-----
src/allmydata/mutable/retrieve.py | 3 +--
2 files changed, 7 insertions(+), 7 deletions(-)
commit e9ab7978c384e1f677cb7779dc449b1044face82
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:54:23 2011 -0400
Retrieve._bad_shares (but not return value, used by Verifier)
src/allmydata/mutable/retrieve.py | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
commit 2d91926de233ec5c881f30e36b4a30ad92ab42a9
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:51:23 2011 -0400
Publish: stop adding .serverid attributes to writers
src/allmydata/mutable/publish.py | 9 ++-------
1 files changed, 2 insertions(+), 7 deletions(-)
commit 47c7a0105dec7cbf4f7e0a3ce800bbb85b15df4a
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:56:33 2011 -0400
API of get_write_enabler()
src/allmydata/mutable/filenode.py | 7 ++++---
src/allmydata/mutable/publish.py | 4 ++--
src/allmydata/test/no_network.py | 3 +++
3 files changed, 9 insertions(+), 5 deletions(-)
commit 9196a5c6590fdbfd660325ea8358b345887d3db0
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:46:24 2011 -0400
API of get_(renewal|cancel)_secret()
src/allmydata/mutable/filenode.py | 14 ++++++++------
src/allmydata/mutable/publish.py | 8 ++++----
src/allmydata/mutable/servermap.py | 5 ++---
3 files changed, 14 insertions(+), 13 deletions(-)
commit de7c1552f8c163eff5b6d820b5fb3b21c1b47cb5
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:41:52 2011 -0400
API of CorruptShareError. Also comment out some related+unused test_web.py code
src/allmydata/mutable/common.py | 13 +++++--------
src/allmydata/mutable/retrieve.py | 10 +++++-----
src/allmydata/mutable/servermap.py | 8 +++-----
src/allmydata/test/common.py | 13 ++++++++-----
4 files changed, 21 insertions(+), 23 deletions(-)
commit 2c1c314046b620c16f1e66d030c150d768b7d01e
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 12:01:46 2011 -0400
API of ServerMap.mark_bad_share()
src/allmydata/mutable/publish.py | 2 +-
src/allmydata/mutable/retrieve.py | 6 +++---
src/allmydata/mutable/servermap.py | 6 ++----
src/allmydata/test/test_mutable.py | 3 +--
4 files changed, 7 insertions(+), 10 deletions(-)
commit 1bed349030779fd0c378ae4e821384f953c6f6ff
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:11:17 2011 -0400
API+name of ServerMap.shares_on_server() : only for tests, so debug_ prefix
src/allmydata/mutable/servermap.py | 7 ++-----
src/allmydata/test/test_mutable.py | 6 +++---
2 files changed, 5 insertions(+), 8 deletions(-)
commit 2d32e448677d6b818692e801045d4115b29abf21
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:07:10 2011 -0400
API of ServerMap.all_servers_for_version()
src/allmydata/mutable/servermap.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
commit 48f3204d1889c3e7179578125c4bdef515af3d6a
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:04:50 2011 -0400
internals of ServerMap methods that use make_versionmap(), remove temp copy
src/allmydata/mutable/servermap.py | 28 +++++++++----------------
1 files changed, 10 insertions(+), 18 deletions(-)
commit 5c3da77b6c777a145bd5ddfaa4db849dc9495548
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:01:28 2011 -0400
API of ServerMap.make_versionmap()
src/allmydata/mutable/checker.py | 4 ++--
src/allmydata/mutable/retrieve.py | 5 ++---
src/allmydata/mutable/servermap.py | 4 ++--
src/allmydata/test/test_mutable.py | 7 ++++---
4 files changed, 10 insertions(+), 10 deletions(-)
commit b6882ece49afb4c507d118af2db346fa329209dc
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 10:53:38 2011 -0400
make a copy of ServerMap.make_versionmap() (_make_versionmap2) for internal use
src/allmydata/mutable/servermap.py | 18 +++++++++++++-----
1 files changed, 13 insertions(+), 5 deletions(-)
commit 963f8e63faf32b950eb1b8103cd2ff16fe8f0151
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:45:58 2011 -0400
API of RetrieveStatus.add_problem()
src/allmydata/mutable/retrieve.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
commit 4976d29ffae565a048851601c29013bbae2976d8
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:45:05 2011 -0400
API of RetrieveStatus.add_fetch_timing()
src/allmydata/mutable/retrieve.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
commit d057d3bbba72663ee148a8b916bc2d52be2e3982
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:44:04 2011 -0400
API of Retrieve.notify_server_corruption()
src/allmydata/mutable/retrieve.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
commit 8a2a81e46671c860610e0e96d6add1a57551f22d
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:42:32 2011 -0400
remove unused _outstanding_queries
src/allmydata/mutable/retrieve.py | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
commit 56d12cc9968d03ccd53764455c671122c4f391d1
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:40:57 2011 -0400
change Retrieve.remaining_sharemap
src/allmydata/mutable/retrieve.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
commit 4f0b7af4821f43290bfc70f2b1fc30149ad81281
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 10:40:18 2011 -0400
accessor for PublishStatus._problems
src/allmydata/mutable/publish.py | 4 +++-
src/allmydata/web/status.py | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
commit 627087cf66d0b8cc519f4d551a967a7bd9b6a741
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 10:36:39 2011 -0400
accessor for RetrieveStatus._problems
src/allmydata/mutable/retrieve.py | 8 ++++++--
src/allmydata/web/status.py | 2 +-
2 files changed, 7 insertions(+), 3 deletions(-)
commit ca7dea81f03801b1c7353fc00ecba689268109cf
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:35:32 2011 -0400
add .server to "reader", so we can get at it later
src/allmydata/mutable/retrieve.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
commit 6ef516e24908ec195af084a7550d1921a5e983b0
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:32:32 2011 -0400
temporarily give Retrieve a _storage_broker, so it can map serverids to servers
src/allmydata/mutable/checker.py | 3 ++-
src/allmydata/mutable/filenode.py | 6 ++++--
src/allmydata/mutable/retrieve.py | 5 +++--
src/allmydata/test/test_mutable.py | 4 ++--
4 files changed, 11 insertions(+), 7 deletions(-)
commit afe08e4dd3f4ff9ff7e8a2a8d28b181e3625bcc9
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:21:51 2011 -0400
mutable/retrieve.py: s/peer/server/
src/allmydata/mutable/retrieve.py | 82 +++++++++++++-------------
src/allmydata/test/test_mutable.py | 6 +-
2 files changed, 44 insertions(+), 44 deletions(-)
commit 910afcb5d7f274880f68dd6cdb5b05f2bbc29adc
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:16:01 2011 -0400
web.status.PublishStatusPage: add comment, I think .problems isn't exercised
src/allmydata/web/status.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
commit 311466dd8c931bbba40d590ade867704282e7f1a
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:48:16 2011 -0400
API of PublishStatus.add_per_server_time()
src/allmydata/mutable/publish.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
commit 2df5faa1b6cbfbaded520d2320305a62fe961118
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:46:37 2011 -0400
more simplifications
src/allmydata/mutable/publish.py | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
commit 6ac4544a3da385f2aad9392f906b90192f4f919a
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:44:08 2011 -0400
API of ServerMap.version_on_server()
src/allmydata/mutable/publish.py | 2 +-
src/allmydata/mutable/servermap.py | 4 ++--
src/allmydata/test/test_mutable.py | 5 ++---
3 files changed, 5 insertions(+), 6 deletions(-)
commit 3e187e322511072e4683329df6b2c6c733a66dba
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:16:32 2011 -0400
API of ServerMap.make_sharemap()
src/allmydata/mutable/servermap.py | 4 ++--
src/allmydata/test/test_mutable.py | 7 ++++---
src/allmydata/web/status.py | 4 ++--
3 files changed, 8 insertions(+), 7 deletions(-)
commit 318feed8437bdd8d4943c6569d38f7b54b6313cc
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:36:19 2011 -0400
small cleanups
src/allmydata/mutable/publish.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
commit bd459ed5714e1db5a7163935c54b7b0b56db8349
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:33:39 2011 -0400
API of ServerMap.add_new_share()
src/allmydata/mutable/publish.py | 4 ++--
src/allmydata/mutable/servermap.py | 6 ++----
2 files changed, 4 insertions(+), 6 deletions(-)
commit f2804fb6ed11d80088e0da8ed48e6c2922f2ffef
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:30:26 2011 -0400
API of ServerMap.get_bad_shares()
src/allmydata/mutable/publish.py | 3 +--
src/allmydata/mutable/servermap.py | 9 ++++-----
2 files changed, 5 insertions(+), 7 deletions(-)
commit 965074a47b3ce1431cb46d9a233840afcf9105f5
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:26:58 2011 -0400
more small cleanups
src/allmydata/mutable/publish.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
commit 38020da34f034f8889947dd3dc05e087ffff7106
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:18:47 2011 -0400
change Publish.bad_share_checkstrings
src/allmydata/mutable/publish.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
commit 5efebcbd2ee0c2f299ea86f7591d856c0f265304
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:16:31 2011 -0400
change internals of Publish.update_goal()
src/allmydata/mutable/publish.py | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
commit e91b55ff4c2a69165b71f2c7b217ac319ff4c527
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:11:42 2011 -0400
get rid of Publish.connections
src/allmydata/mutable/publish.py | 27 +++++----------------------
1 files changed, 5 insertions(+), 22 deletions(-)
commit 64e9a53b3229ebe2f9ebf7ed502d539311d0e037
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:05:32 2011 -0400
change Publish.bad_servers
src/allmydata/mutable/publish.py | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
commit b85a934bef315a06bcfe00c9c12a3627fed2b918
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:03:07 2011 -0400
Publish.bad_servers: fix bug, this should be a set of serverids, not writers
src/allmydata/mutable/publish.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
commit 605ea15ec15ed671513819003ccd211cdb9761e0
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:00:21 2011 -0400
change .placed
src/allmydata/mutable/publish.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
commit f7aba37b1b345d5b6d5cb16e3b3f6f3c1afb658e
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 22:59:22 2011 -0400
temporarily stash IServer as .server on the "writer" object
src/allmydata/mutable/publish.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
commit f9b551d788e7db1f187fce5ab98ab5d5fe4e1c36
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 22:48:18 2011 -0400
change Publish.goal and API of log_goal() to use IServer, not serverid
src/allmydata/mutable/publish.py | 48 ++++++++++++++--------------
1 files changed, 24 insertions(+), 24 deletions(-)
commit 75f20616558e4900b8b1f685dd99aa838de6d452
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:27:02 2011 -0400
API of ServerMap.get_known_shares()
src/allmydata/mutable/publish.py | 16 ++++++++++------
src/allmydata/mutable/servermap.py | 7 ++-----
2 files changed, 12 insertions(+), 11 deletions(-)
commit 1c38c9d37bb08221b4418762234b1a62397b3b4b
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:20:29 2011 -0400
Publish.full_serverlist
src/allmydata/mutable/publish.py | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
commit b6cbd215a04b9cde31a7d92a97a7f048622b16f1
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:12:31 2011 -0400
API of ServerMap.all_servers()
src/allmydata/mutable/servermap.py | 19 ++++++-------------
1 files changed, 6 insertions(+), 13 deletions(-)
commit e63cd0315fae65357b1727ec6d5ff3c6e0d27c98
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:10:18 2011 -0400
remove ServerMap.connections, set_rref_for_serverid()
src/allmydata/mutable/servermap.py | 11 +----------
1 files changed, 1 insertions(+), 10 deletions(-)
commit 4df52db2f80eb12eefa5d57103c24893cde89553
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:04:06 2011 -0400
API of ServerMap.mark_server_reachable()
src/allmydata/mutable/servermap.py | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
commit 69c715bde77944dc25181b3dbbeb042c816f9a1b
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:03:21 2011 -0400
API of ServerMap.mark_server_unreachable()
src/allmydata/mutable/servermap.py | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
commit 3d784d60eec1c508858e3a617e4411ffbcc3c1fa
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:02:03 2011 -0400
API of status.set_privkey_from()
src/allmydata/mutable/servermap.py | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
commit 544ed3ea29bed7e66da7fd29ca3f6f076f27a9e6
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:01:15 2011 -0400
API of status.add_per_server_time()
src/allmydata/mutable/servermap.py | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
commit fffe5008b6320bd1e04c3c68389a2bf2ee383fa8
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:59:02 2011 -0400
remove unused .versionmap
src/allmydata/mutable/servermap.py | 7 -------
1 files changed, 0 insertions(+), 7 deletions(-)
commit 2816562e090d2294179db3588dafcca18de1bc2b
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:57:51 2011 -0400
remove serverid from all log messages. Also one unused lambda.
src/allmydata/mutable/servermap.py | 30 +++++++++++++-------------
1 files changed, 15 insertions(+), 15 deletions(-)
commit 28fa6b1a2738fa98c1f1dbd3d0e01ae98912d11f
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:54:30 2011 -0400
removed unused _readers
src/allmydata/mutable/servermap.py | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
commit a8e4ed3d645ab592d1add6a1e69b6d1ebfb77817
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:54:16 2011 -0400
remove unused _sharemap
src/allmydata/mutable/servermap.py | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
commit 3f072e55cf1d0700f9fffe23f8f3a475725df588
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:49:03 2011 -0400
_must_query
src/allmydata/mutable/servermap.py | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
commit c599a059b8df3f5785e4bf89fb6ecc6d8dcd708b
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:48:05 2011 -0400
_queries_outstanding
src/allmydata/mutable/servermap.py | 16 +++++++---------
1 files changed, 7 insertions(+), 9 deletions(-)
commit 7743759f98ac2c07926b2fdbd80bf52dfab33085
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:46:17 2011 -0400
_empty_servers
src/allmydata/mutable/servermap.py | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
commit 6bb1825916828a713a32cdf7f7411fa3ea2e1e5d
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:45:39 2011 -0400
_good_servers
src/allmydata/mutable/servermap.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
commit 1768fab1b51d8dd93ecabbaaabfadfa20cf6c3d4
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:44:59 2011 -0400
_bad_servers
src/allmydata/mutable/servermap.py | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
commit dccbaef30f0ba714c746bf6d4a1a803c36e17b65
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:41:54 2011 -0400
API of _try_to_set_pubkey()
src/allmydata/mutable/servermap.py | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
commit 0481ea70042ba3575f15eac7fd0780f8ece580cc
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:35:02 2011 -0400
API of notify_server_corruption()
src/allmydata/mutable/servermap.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
commit bea9cba18fb3b9c11bb22f18356a263ecec7351e
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:34:09 2011 -0400
API of _got_signature_one_share()
src/allmydata/mutable/servermap.py | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
commit 1520123583cf78650706e114b15bb5b0ac1f4a14
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:32:33 2011 -0400
API of _try_to_validate_privkey()
src/allmydata/mutable/servermap.py | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
commit 938852c9c8519c7a078f58a9b1f4dd8ec8b6715e
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:31:48 2011 -0400
API and internals of _add_lease_failed()
src/allmydata/mutable/servermap.py | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
commit 3843dba367e3c19e176a622ab853cb51d2472ddf
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:30:37 2011 -0400
API of _privkey_query_failed()
src/allmydata/mutable/servermap.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
commit 2219a710e1633cd57d0ca0786490de87b3e19ba7
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:29:43 2011 -0400
fix bug in call to _privkey_query_failed, unrelated to refactoring
src/allmydata/mutable/servermap.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
commit ae615bec7d0d1b269710b6902797b12f9592ad62
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:27:17 2011 -0400
API of _got_corrupt_share()
src/allmydata/mutable/servermap.py | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)
commit cb51c95a6f4e077278157a77dab060c8c1ad7a81
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:23:16 2011 -0400
API of _got_results()
src/allmydata/mutable/servermap.py | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
commit bac9154fe0af18f226999a58ffc2362d8cf4b802
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:19:19 2011 -0400
API of _query_failed()
src/allmydata/mutable/servermap.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
commit fdc29a8ca95d4b5c503e5382b9e5d4d02141ba12
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:17:20 2011 -0400
API of _do_read()
src/allmydata/mutable/servermap.py | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
commit e7e9e338f28d004aa4d423d11c65f1e271ac7322
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:20:21 2011 -0400
API of _do_query()
src/allmydata/mutable/servermap.py | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
commit 330625b9dac4cdbe72a11464a893065b9aeed453
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:43:05 2011 -0400
next step: first batch of updates to ServermapUpdater
updates:
most method-local variables in update()
API of _build_initial_querylist()
API of _send_initial_requests()
.full_serverlist
.extra_servers
src/allmydata/mutable/servermap.py | 39 ++++++++++++++------------
1 files changed, 21 insertions(+), 18 deletions(-)
commit 4aadc584fa7dcb2daa86b048c81dee0049ba26d9
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:07:00 2011 -0400
internal change: index _bad_shares with IServer
src/allmydata/mutable/servermap.py | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
commit 16d4e6fa82a9907dbdc92094213387c6a4164e41
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:20:47 2011 +0100
internal change: index _known_shares with IServer instead of serverid
callers are unchanged
src/allmydata/mutable/servermap.py | 42 +++++++++++++++----------
1 files changed, 25 insertions(+), 17 deletions(-)
commit ceeb5f4938cc814a0c75d1b8f4018aed965c2176
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:11:43 2011 +0100
accessors and name cleanup for servermap.Servermap.last_update_mode/time
src/allmydata/mutable/filenode.py | 6 +++---
src/allmydata/mutable/publish.py | 4 ++--
src/allmydata/mutable/servermap.py | 17 +++++++++++------
3 files changed, 16 insertions(+), 11 deletions(-)
commit 8d3cbda82661c0a7e5c3d3b65cf7a5d5ab7e32c0
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:11:14 2011 +0100
accessors and name cleanup for servermap.Servermap.problems
src/allmydata/mutable/servermap.py | 21 +++++++++++++--------
src/allmydata/test/test_mutable.py | 6 +++---
2 files changed, 16 insertions(+), 11 deletions(-)
commit 348f57988f79389db0aab7672e6eaa9a6d8e3219
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:10:41 2011 +0100
accessors and name cleanup for servermap.Servermap.bad_shares
src/allmydata/mutable/publish.py | 2 +-
src/allmydata/mutable/servermap.py | 30 ++++++++++++++-----------
2 files changed, 18 insertions(+), 14 deletions(-)
commit 520c9368134673cdf76c653c5e1bb91c2ab5d51e
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:10:05 2011 +0100
accessors and name cleanup for servermap.Servermap.servermap .
src/allmydata/mutable/publish.py | 14 +++++----
src/allmydata/mutable/servermap.py | 38 ++++++++++++++-----------
2 files changed, 29 insertions(+), 23 deletions(-)
commit b8b8dc38287a91dbdf494426ac801d9381ce5841
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:08:02 2011 +0100
fix reachable_servers
src/allmydata/mutable/checker.py | 3 ++-
src/allmydata/mutable/publish.py | 4 +++-
src/allmydata/mutable/servermap.py | 12 ++++++++++--
3 files changed, 15 insertions(+), 4 deletions(-)
commit cb0cfd1adfefad357c187aaaf690c3df68b622bc
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:06:03 2011 +0100
fix Servermap.unreachable_servers
src/allmydata/mutable/servermap.py | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
commit 2d9ea79b94bd4db674d40386fda90825785ac495
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:03:48 2011 +0100
give ServerMap a StorageFarmBroker, temporary
this makes it possible for the ServerMap to accept bare serverids and still
build data structures with IServers
src/allmydata/mutable/checker.py | 2 +-
src/allmydata/mutable/filenode.py | 2 +-
src/allmydata/mutable/publish.py | 2 +-
src/allmydata/mutable/servermap.py | 5 +++--
src/allmydata/test/test_mutable.py | 8 ++++----
5 files changed, 10 insertions(+), 9 deletions(-)
commit 718d1aeff6fded893f65397806d22ece928b0dd4
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 13:43:30 2011 -0400
add StorageFarmBroker.get_server_for_id(), temporary helper
This will go away once we're passing IServers everywhere.
src/allmydata/storage_client.py | 2 ++
src/allmydata/test/no_network.py | 13 +++++++++++++
2 files changed, 15 insertions(+), 0 deletions(-)
commit ece20231d7fda0d503704842a4aa068dfbc2e54e
Author: Brian Warner <warner@lothar.com>
Date: Sun Oct 2 01:11:50 2011 +0100
add proper accessors for Servermap.connections, to make refactoring easier
src/allmydata/mutable/publish.py | 6 +++---
src/allmydata/mutable/retrieve.py | 10 +++++-----
src/allmydata/mutable/servermap.py | 17 +++++++++++------
3 files changed, 19 insertions(+), 14 deletions(-)
commit 3b943d6bf302ff702668081a612fc4fe2604cf9c
Author: Brian Warner <warner@lothar.com>
Date: Fri Sep 23 10:34:30 2011 -0700
mutable/servermap.py and neighbors: s/peer/server/
src/allmydata/mutable/checker.py | 22 +-
src/allmydata/mutable/publish.py | 204 +++++++-------
src/allmydata/mutable/servermap.py | 402 +++++++++++++-------------
src/allmydata/test/test_mutable.py | 18 +-
4 files changed, 323 insertions(+), 323 deletions(-)
2011-11-01 04:03:19 +00:00
|
|
|
problems = data.get_problems()
|
2008-03-05 21:59:56 +00:00
|
|
|
if not problems:
|
|
|
|
return ""
|
|
|
|
l = T.ul()
|
|
|
|
for peerid in sorted(problems.keys()):
|
|
|
|
peerid_s = idlib.shortnodeid_b2a(peerid)
|
|
|
|
l[T.li["[%s]: %s" % (peerid_s, problems[peerid])]]
|
|
|
|
return ctx.tag["Server Problems:", l]
|
|
|
|
|
|
|
|
def _get_rate(self, data, name):
|
|
|
|
file_size = self.retrieve_status.get_size()
|
|
|
|
time = self.retrieve_status.timings.get(name)
|
2010-08-15 14:19:33 +00:00
|
|
|
return compute_rate(file_size, time)
|
2008-03-05 21:59:56 +00:00
|
|
|
|
|
|
|
def data_time_total(self, ctx, data):
|
|
|
|
return self.retrieve_status.timings.get("total")
|
|
|
|
def data_rate_total(self, ctx, data):
|
|
|
|
return self._get_rate(data, "total")
|
|
|
|
|
|
|
|
def data_time_fetch(self, ctx, data):
|
|
|
|
return self.retrieve_status.timings.get("fetch")
|
|
|
|
def data_rate_fetch(self, ctx, data):
|
|
|
|
return self._get_rate(data, "fetch")
|
|
|
|
|
|
|
|
def data_time_decode(self, ctx, data):
|
|
|
|
return self.retrieve_status.timings.get("decode")
|
|
|
|
def data_rate_decode(self, ctx, data):
|
|
|
|
return self._get_rate(data, "decode")
|
|
|
|
|
|
|
|
def data_time_decrypt(self, ctx, data):
|
|
|
|
return self.retrieve_status.timings.get("decrypt")
|
|
|
|
def data_rate_decrypt(self, ctx, data):
|
|
|
|
return self._get_rate(data, "decrypt")
|
|
|
|
|
|
|
|
def render_server_timings(self, ctx, data):
|
|
|
|
per_server = self.retrieve_status.timings.get("fetch_per_server")
|
|
|
|
if not per_server:
|
|
|
|
return ""
|
|
|
|
l = T.ul()
|
2012-03-17 23:52:32 +00:00
|
|
|
for server in sorted(per_server.keys(), key=lambda s: s.get_name()):
|
2008-03-05 21:59:56 +00:00
|
|
|
times_s = ", ".join([self.render_time(None, t)
|
2012-03-17 23:52:32 +00:00
|
|
|
for t in per_server[server]])
|
|
|
|
l[T.li["[%s]: %s" % (server.get_name(), times_s)]]
|
2008-03-05 21:59:56 +00:00
|
|
|
return T.li["Per-Server Fetch Response Times: ", l]
|
|
|
|
|
|
|
|
|
2008-03-06 01:41:10 +00:00
|
|
|
class PublishStatusPage(rend.Page, RateAndTimeMixin):
|
2008-03-05 21:59:56 +00:00
|
|
|
docFactory = getxmlfile("publish-status.xhtml")
|
|
|
|
|
2008-03-06 01:41:10 +00:00
|
|
|
def __init__(self, data):
|
|
|
|
rend.Page.__init__(self, data)
|
|
|
|
self.publish_status = data
|
|
|
|
|
2008-03-05 21:59:56 +00:00
|
|
|
def render_started(self, ctx, data):
|
|
|
|
TIME_FORMAT = "%H:%M:%S %d-%b-%Y"
|
|
|
|
started_s = time.strftime(TIME_FORMAT,
|
|
|
|
time.localtime(data.get_started()))
|
|
|
|
return started_s
|
|
|
|
|
|
|
|
def render_si(self, ctx, data):
|
|
|
|
si_s = base32.b2a_or_none(data.get_storage_index())
|
|
|
|
if si_s is None:
|
|
|
|
si_s = "(None)"
|
|
|
|
return si_s
|
|
|
|
|
|
|
|
def render_helper(self, ctx, data):
|
|
|
|
return {True: "Yes",
|
|
|
|
False: "No"}[data.using_helper()]
|
|
|
|
|
|
|
|
def render_current_size(self, ctx, data):
|
|
|
|
size = data.get_size()
|
|
|
|
if size is None:
|
|
|
|
size = "(unknown)"
|
|
|
|
return size
|
|
|
|
|
|
|
|
def render_progress(self, ctx, data):
|
|
|
|
progress = data.get_progress()
|
|
|
|
# TODO: make an ascii-art bar
|
|
|
|
return "%.1f%%" % (100.0 * progress)
|
|
|
|
|
|
|
|
def render_status(self, ctx, data):
|
|
|
|
return data.get_status()
|
|
|
|
|
2008-03-06 01:41:10 +00:00
|
|
|
def render_encoding(self, ctx, data):
|
|
|
|
k, n = data.get_encoding()
|
|
|
|
return ctx.tag["Encoding: %s of %s" % (k, n)]
|
|
|
|
|
|
|
|
def render_sharemap(self, ctx, data):
|
2008-04-17 00:49:06 +00:00
|
|
|
servermap = data.get_servermap()
|
|
|
|
if servermap is None:
|
2008-03-06 01:41:10 +00:00
|
|
|
return ctx.tag["None"]
|
|
|
|
l = T.ul()
|
2008-04-17 00:49:06 +00:00
|
|
|
sharemap = servermap.make_sharemap()
|
2008-03-06 01:41:10 +00:00
|
|
|
for shnum in sorted(sharemap.keys()):
|
|
|
|
l[T.li["%d -> Placed on " % shnum,
|
IServer refactoring: pass IServer instances around, instead of peerids
refs #1363
This collapses 88 small incremental changes (each of which passes all tests)
into one big patch. The development process for the long path started with
adding some temporary scaffolding, changing one method at a time, then
removing the scaffolding. The individual pieces are as follows, in reverse
chronological order (the first patch is at the end of this comment):
commit 9bbe4174fd0d98a6cf47a8ef96e85d9ef34b2f9a
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 16:05:00 2011 -0400
immutable/downloader/status.py: correct comment
src/allmydata/immutable/downloader/status.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
commit 72146a7c7c91eac2f7c3ceb801eb7a1721376889
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 15:46:20 2011 -0400
remove temporary ServerMap._storage_broker
src/allmydata/mutable/checker.py | 2 +-
src/allmydata/mutable/filenode.py | 2 +-
src/allmydata/mutable/publish.py | 2 +-
src/allmydata/mutable/servermap.py | 5 ++---
src/allmydata/test/test_mutable.py | 8 ++++----
5 files changed, 9 insertions(+), 10 deletions(-)
commit d703096b41632c47d76414b12672e076a422ff5c
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 15:37:05 2011 -0400
remove temporary storage_broker.get_server_for_id()
src/allmydata/storage_client.py | 3 ---
src/allmydata/test/no_network.py | 13 -------------
2 files changed, 0 insertions(+), 16 deletions(-)
commit 620cc5d80882ef6f7decfd26af8a6c7c1ddf80d1
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 12:50:06 2011 -0400
API of Retrieve._try_to_validate_privkey(), trying to remove reader.server
src/allmydata/mutable/retrieve.py | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
commit 92f43f856f4a8b36c207d1b190ed8699b5a4ecb4
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 12:48:08 2011 -0400
API of Retrieve._validate_block(), trying to remove reader.server
src/allmydata/mutable/retrieve.py | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
commit 572d5070761861a2190349d1ed8d85dbc25698a5
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 12:36:58 2011 -0400
API of Retrieve._mark_bad_share(), trying to remove reader.server
src/allmydata/mutable/retrieve.py | 21 +++++++++------------
1 files changed, 9 insertions(+), 12 deletions(-)
commit a793ff00c0de1e2eec7b46288fdf388c7a2bec89
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 12:06:13 2011 -0400
remove now-unused get_rref_for_serverid()
src/allmydata/mutable/servermap.py | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
commit 1b9827cc9366bf90b93297fdd6832f2ad0480ce7
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 12:03:09 2011 -0400
Retrieve: stop adding .serverid attributes to readers
src/allmydata/mutable/retrieve.py | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
commit 5d4e9d491b19e49d2e443a1dfff2c672842c36ef
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 12:03:34 2011 -0400
return value of Retrieve(verify=True)
src/allmydata/mutable/checker.py | 11 ++++++-----
src/allmydata/mutable/retrieve.py | 3 +--
2 files changed, 7 insertions(+), 7 deletions(-)
commit e9ab7978c384e1f677cb7779dc449b1044face82
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:54:23 2011 -0400
Retrieve._bad_shares (but not return value, used by Verifier)
src/allmydata/mutable/retrieve.py | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
commit 2d91926de233ec5c881f30e36b4a30ad92ab42a9
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:51:23 2011 -0400
Publish: stop adding .serverid attributes to writers
src/allmydata/mutable/publish.py | 9 ++-------
1 files changed, 2 insertions(+), 7 deletions(-)
commit 47c7a0105dec7cbf4f7e0a3ce800bbb85b15df4a
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:56:33 2011 -0400
API of get_write_enabler()
src/allmydata/mutable/filenode.py | 7 ++++---
src/allmydata/mutable/publish.py | 4 ++--
src/allmydata/test/no_network.py | 3 +++
3 files changed, 9 insertions(+), 5 deletions(-)
commit 9196a5c6590fdbfd660325ea8358b345887d3db0
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:46:24 2011 -0400
API of get_(renewal|cancel)_secret()
src/allmydata/mutable/filenode.py | 14 ++++++++------
src/allmydata/mutable/publish.py | 8 ++++----
src/allmydata/mutable/servermap.py | 5 ++---
3 files changed, 14 insertions(+), 13 deletions(-)
commit de7c1552f8c163eff5b6d820b5fb3b21c1b47cb5
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:41:52 2011 -0400
API of CorruptShareError. Also comment out some related+unused test_web.py code
src/allmydata/mutable/common.py | 13 +++++--------
src/allmydata/mutable/retrieve.py | 10 +++++-----
src/allmydata/mutable/servermap.py | 8 +++-----
src/allmydata/test/common.py | 13 ++++++++-----
4 files changed, 21 insertions(+), 23 deletions(-)
commit 2c1c314046b620c16f1e66d030c150d768b7d01e
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 12:01:46 2011 -0400
API of ServerMap.mark_bad_share()
src/allmydata/mutable/publish.py | 2 +-
src/allmydata/mutable/retrieve.py | 6 +++---
src/allmydata/mutable/servermap.py | 6 ++----
src/allmydata/test/test_mutable.py | 3 +--
4 files changed, 7 insertions(+), 10 deletions(-)
commit 1bed349030779fd0c378ae4e821384f953c6f6ff
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:11:17 2011 -0400
API+name of ServerMap.shares_on_server() : only for tests, so debug_ prefix
src/allmydata/mutable/servermap.py | 7 ++-----
src/allmydata/test/test_mutable.py | 6 +++---
2 files changed, 5 insertions(+), 8 deletions(-)
commit 2d32e448677d6b818692e801045d4115b29abf21
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:07:10 2011 -0400
API of ServerMap.all_servers_for_version()
src/allmydata/mutable/servermap.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
commit 48f3204d1889c3e7179578125c4bdef515af3d6a
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:04:50 2011 -0400
internals of ServerMap methods that use make_versionmap(), remove temp copy
src/allmydata/mutable/servermap.py | 28 +++++++++----------------
1 files changed, 10 insertions(+), 18 deletions(-)
commit 5c3da77b6c777a145bd5ddfaa4db849dc9495548
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:01:28 2011 -0400
API of ServerMap.make_versionmap()
src/allmydata/mutable/checker.py | 4 ++--
src/allmydata/mutable/retrieve.py | 5 ++---
src/allmydata/mutable/servermap.py | 4 ++--
src/allmydata/test/test_mutable.py | 7 ++++---
4 files changed, 10 insertions(+), 10 deletions(-)
commit b6882ece49afb4c507d118af2db346fa329209dc
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 10:53:38 2011 -0400
make a copy of ServerMap.make_versionmap() (_make_versionmap2) for internal use
src/allmydata/mutable/servermap.py | 18 +++++++++++++-----
1 files changed, 13 insertions(+), 5 deletions(-)
commit 963f8e63faf32b950eb1b8103cd2ff16fe8f0151
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:45:58 2011 -0400
API of RetrieveStatus.add_problem()
src/allmydata/mutable/retrieve.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
commit 4976d29ffae565a048851601c29013bbae2976d8
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:45:05 2011 -0400
API of RetrieveStatus.add_fetch_timing()
src/allmydata/mutable/retrieve.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
commit d057d3bbba72663ee148a8b916bc2d52be2e3982
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:44:04 2011 -0400
API of Retrieve.notify_server_corruption()
src/allmydata/mutable/retrieve.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
commit 8a2a81e46671c860610e0e96d6add1a57551f22d
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:42:32 2011 -0400
remove unused _outstanding_queries
src/allmydata/mutable/retrieve.py | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
commit 56d12cc9968d03ccd53764455c671122c4f391d1
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:40:57 2011 -0400
change Retrieve.remaining_sharemap
src/allmydata/mutable/retrieve.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
commit 4f0b7af4821f43290bfc70f2b1fc30149ad81281
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 10:40:18 2011 -0400
accessor for PublishStatus._problems
src/allmydata/mutable/publish.py | 4 +++-
src/allmydata/web/status.py | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
commit 627087cf66d0b8cc519f4d551a967a7bd9b6a741
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 10:36:39 2011 -0400
accessor for RetrieveStatus._problems
src/allmydata/mutable/retrieve.py | 8 ++++++--
src/allmydata/web/status.py | 2 +-
2 files changed, 7 insertions(+), 3 deletions(-)
commit ca7dea81f03801b1c7353fc00ecba689268109cf
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:35:32 2011 -0400
add .server to "reader", so we can get at it later
src/allmydata/mutable/retrieve.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
commit 6ef516e24908ec195af084a7550d1921a5e983b0
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:32:32 2011 -0400
temporarily give Retrieve a _storage_broker, so it can map serverids to servers
src/allmydata/mutable/checker.py | 3 ++-
src/allmydata/mutable/filenode.py | 6 ++++--
src/allmydata/mutable/retrieve.py | 5 +++--
src/allmydata/test/test_mutable.py | 4 ++--
4 files changed, 11 insertions(+), 7 deletions(-)
commit afe08e4dd3f4ff9ff7e8a2a8d28b181e3625bcc9
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:21:51 2011 -0400
mutable/retrieve.py: s/peer/server/
src/allmydata/mutable/retrieve.py | 82 +++++++++++++-------------
src/allmydata/test/test_mutable.py | 6 +-
2 files changed, 44 insertions(+), 44 deletions(-)
commit 910afcb5d7f274880f68dd6cdb5b05f2bbc29adc
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:16:01 2011 -0400
web.status.PublishStatusPage: add comment, I think .problems isn't exercised
src/allmydata/web/status.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
commit 311466dd8c931bbba40d590ade867704282e7f1a
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:48:16 2011 -0400
API of PublishStatus.add_per_server_time()
src/allmydata/mutable/publish.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
commit 2df5faa1b6cbfbaded520d2320305a62fe961118
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:46:37 2011 -0400
more simplifications
src/allmydata/mutable/publish.py | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
commit 6ac4544a3da385f2aad9392f906b90192f4f919a
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:44:08 2011 -0400
API of ServerMap.version_on_server()
src/allmydata/mutable/publish.py | 2 +-
src/allmydata/mutable/servermap.py | 4 ++--
src/allmydata/test/test_mutable.py | 5 ++---
3 files changed, 5 insertions(+), 6 deletions(-)
commit 3e187e322511072e4683329df6b2c6c733a66dba
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:16:32 2011 -0400
API of ServerMap.make_sharemap()
src/allmydata/mutable/servermap.py | 4 ++--
src/allmydata/test/test_mutable.py | 7 ++++---
src/allmydata/web/status.py | 4 ++--
3 files changed, 8 insertions(+), 7 deletions(-)
commit 318feed8437bdd8d4943c6569d38f7b54b6313cc
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:36:19 2011 -0400
small cleanups
src/allmydata/mutable/publish.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
commit bd459ed5714e1db5a7163935c54b7b0b56db8349
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:33:39 2011 -0400
API of ServerMap.add_new_share()
src/allmydata/mutable/publish.py | 4 ++--
src/allmydata/mutable/servermap.py | 6 ++----
2 files changed, 4 insertions(+), 6 deletions(-)
commit f2804fb6ed11d80088e0da8ed48e6c2922f2ffef
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:30:26 2011 -0400
API of ServerMap.get_bad_shares()
src/allmydata/mutable/publish.py | 3 +--
src/allmydata/mutable/servermap.py | 9 ++++-----
2 files changed, 5 insertions(+), 7 deletions(-)
commit 965074a47b3ce1431cb46d9a233840afcf9105f5
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:26:58 2011 -0400
more small cleanups
src/allmydata/mutable/publish.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
commit 38020da34f034f8889947dd3dc05e087ffff7106
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:18:47 2011 -0400
change Publish.bad_share_checkstrings
src/allmydata/mutable/publish.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
commit 5efebcbd2ee0c2f299ea86f7591d856c0f265304
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:16:31 2011 -0400
change internals of Publish.update_goal()
src/allmydata/mutable/publish.py | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
commit e91b55ff4c2a69165b71f2c7b217ac319ff4c527
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:11:42 2011 -0400
get rid of Publish.connections
src/allmydata/mutable/publish.py | 27 +++++----------------------
1 files changed, 5 insertions(+), 22 deletions(-)
commit 64e9a53b3229ebe2f9ebf7ed502d539311d0e037
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:05:32 2011 -0400
change Publish.bad_servers
src/allmydata/mutable/publish.py | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
commit b85a934bef315a06bcfe00c9c12a3627fed2b918
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:03:07 2011 -0400
Publish.bad_servers: fix bug, this should be a set of serverids, not writers
src/allmydata/mutable/publish.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
commit 605ea15ec15ed671513819003ccd211cdb9761e0
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:00:21 2011 -0400
change .placed
src/allmydata/mutable/publish.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
commit f7aba37b1b345d5b6d5cb16e3b3f6f3c1afb658e
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 22:59:22 2011 -0400
temporarily stash IServer as .server on the "writer" object
src/allmydata/mutable/publish.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
commit f9b551d788e7db1f187fce5ab98ab5d5fe4e1c36
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 22:48:18 2011 -0400
change Publish.goal and API of log_goal() to use IServer, not serverid
src/allmydata/mutable/publish.py | 48 ++++++++++++++--------------
1 files changed, 24 insertions(+), 24 deletions(-)
commit 75f20616558e4900b8b1f685dd99aa838de6d452
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:27:02 2011 -0400
API of ServerMap.get_known_shares()
src/allmydata/mutable/publish.py | 16 ++++++++++------
src/allmydata/mutable/servermap.py | 7 ++-----
2 files changed, 12 insertions(+), 11 deletions(-)
commit 1c38c9d37bb08221b4418762234b1a62397b3b4b
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:20:29 2011 -0400
Publish.full_serverlist
src/allmydata/mutable/publish.py | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
commit b6cbd215a04b9cde31a7d92a97a7f048622b16f1
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:12:31 2011 -0400
API of ServerMap.all_servers()
src/allmydata/mutable/servermap.py | 19 ++++++-------------
1 files changed, 6 insertions(+), 13 deletions(-)
commit e63cd0315fae65357b1727ec6d5ff3c6e0d27c98
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:10:18 2011 -0400
remove ServerMap.connections, set_rref_for_serverid()
src/allmydata/mutable/servermap.py | 11 +----------
1 files changed, 1 insertions(+), 10 deletions(-)
commit 4df52db2f80eb12eefa5d57103c24893cde89553
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:04:06 2011 -0400
API of ServerMap.mark_server_reachable()
src/allmydata/mutable/servermap.py | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
commit 69c715bde77944dc25181b3dbbeb042c816f9a1b
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:03:21 2011 -0400
API of ServerMap.mark_server_unreachable()
src/allmydata/mutable/servermap.py | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
commit 3d784d60eec1c508858e3a617e4411ffbcc3c1fa
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:02:03 2011 -0400
API of status.set_privkey_from()
src/allmydata/mutable/servermap.py | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
commit 544ed3ea29bed7e66da7fd29ca3f6f076f27a9e6
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:01:15 2011 -0400
API of status.add_per_server_time()
src/allmydata/mutable/servermap.py | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
commit fffe5008b6320bd1e04c3c68389a2bf2ee383fa8
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:59:02 2011 -0400
remove unused .versionmap
src/allmydata/mutable/servermap.py | 7 -------
1 files changed, 0 insertions(+), 7 deletions(-)
commit 2816562e090d2294179db3588dafcca18de1bc2b
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:57:51 2011 -0400
remove serverid from all log messages. Also one unused lambda.
src/allmydata/mutable/servermap.py | 30 +++++++++++++-------------
1 files changed, 15 insertions(+), 15 deletions(-)
commit 28fa6b1a2738fa98c1f1dbd3d0e01ae98912d11f
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:54:30 2011 -0400
removed unused _readers
src/allmydata/mutable/servermap.py | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
commit a8e4ed3d645ab592d1add6a1e69b6d1ebfb77817
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:54:16 2011 -0400
remove unused _sharemap
src/allmydata/mutable/servermap.py | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
commit 3f072e55cf1d0700f9fffe23f8f3a475725df588
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:49:03 2011 -0400
_must_query
src/allmydata/mutable/servermap.py | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
commit c599a059b8df3f5785e4bf89fb6ecc6d8dcd708b
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:48:05 2011 -0400
_queries_outstanding
src/allmydata/mutable/servermap.py | 16 +++++++---------
1 files changed, 7 insertions(+), 9 deletions(-)
commit 7743759f98ac2c07926b2fdbd80bf52dfab33085
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:46:17 2011 -0400
_empty_servers
src/allmydata/mutable/servermap.py | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
commit 6bb1825916828a713a32cdf7f7411fa3ea2e1e5d
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:45:39 2011 -0400
_good_servers
src/allmydata/mutable/servermap.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
commit 1768fab1b51d8dd93ecabbaaabfadfa20cf6c3d4
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:44:59 2011 -0400
_bad_servers
src/allmydata/mutable/servermap.py | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
commit dccbaef30f0ba714c746bf6d4a1a803c36e17b65
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:41:54 2011 -0400
API of _try_to_set_pubkey()
src/allmydata/mutable/servermap.py | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
commit 0481ea70042ba3575f15eac7fd0780f8ece580cc
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:35:02 2011 -0400
API of notify_server_corruption()
src/allmydata/mutable/servermap.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
commit bea9cba18fb3b9c11bb22f18356a263ecec7351e
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:34:09 2011 -0400
API of _got_signature_one_share()
src/allmydata/mutable/servermap.py | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
commit 1520123583cf78650706e114b15bb5b0ac1f4a14
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:32:33 2011 -0400
API of _try_to_validate_privkey()
src/allmydata/mutable/servermap.py | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
commit 938852c9c8519c7a078f58a9b1f4dd8ec8b6715e
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:31:48 2011 -0400
API and internals of _add_lease_failed()
src/allmydata/mutable/servermap.py | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
commit 3843dba367e3c19e176a622ab853cb51d2472ddf
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:30:37 2011 -0400
API of _privkey_query_failed()
src/allmydata/mutable/servermap.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
commit 2219a710e1633cd57d0ca0786490de87b3e19ba7
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:29:43 2011 -0400
fix bug in call to _privkey_query_failed, unrelated to refactoring
src/allmydata/mutable/servermap.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
commit ae615bec7d0d1b269710b6902797b12f9592ad62
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:27:17 2011 -0400
API of _got_corrupt_share()
src/allmydata/mutable/servermap.py | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)
commit cb51c95a6f4e077278157a77dab060c8c1ad7a81
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:23:16 2011 -0400
API of _got_results()
src/allmydata/mutable/servermap.py | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
commit bac9154fe0af18f226999a58ffc2362d8cf4b802
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:19:19 2011 -0400
API of _query_failed()
src/allmydata/mutable/servermap.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
commit fdc29a8ca95d4b5c503e5382b9e5d4d02141ba12
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:17:20 2011 -0400
API of _do_read()
src/allmydata/mutable/servermap.py | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
commit e7e9e338f28d004aa4d423d11c65f1e271ac7322
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:20:21 2011 -0400
API of _do_query()
src/allmydata/mutable/servermap.py | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
commit 330625b9dac4cdbe72a11464a893065b9aeed453
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:43:05 2011 -0400
next step: first batch of updates to ServermapUpdater
updates:
most method-local variables in update()
API of _build_initial_querylist()
API of _send_initial_requests()
.full_serverlist
.extra_servers
src/allmydata/mutable/servermap.py | 39 ++++++++++++++------------
1 files changed, 21 insertions(+), 18 deletions(-)
commit 4aadc584fa7dcb2daa86b048c81dee0049ba26d9
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:07:00 2011 -0400
internal change: index _bad_shares with IServer
src/allmydata/mutable/servermap.py | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
commit 16d4e6fa82a9907dbdc92094213387c6a4164e41
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:20:47 2011 +0100
internal change: index _known_shares with IServer instead of serverid
callers are unchanged
src/allmydata/mutable/servermap.py | 42 +++++++++++++++----------
1 files changed, 25 insertions(+), 17 deletions(-)
commit ceeb5f4938cc814a0c75d1b8f4018aed965c2176
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:11:43 2011 +0100
accessors and name cleanup for servermap.Servermap.last_update_mode/time
src/allmydata/mutable/filenode.py | 6 +++---
src/allmydata/mutable/publish.py | 4 ++--
src/allmydata/mutable/servermap.py | 17 +++++++++++------
3 files changed, 16 insertions(+), 11 deletions(-)
commit 8d3cbda82661c0a7e5c3d3b65cf7a5d5ab7e32c0
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:11:14 2011 +0100
accessors and name cleanup for servermap.Servermap.problems
src/allmydata/mutable/servermap.py | 21 +++++++++++++--------
src/allmydata/test/test_mutable.py | 6 +++---
2 files changed, 16 insertions(+), 11 deletions(-)
commit 348f57988f79389db0aab7672e6eaa9a6d8e3219
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:10:41 2011 +0100
accessors and name cleanup for servermap.Servermap.bad_shares
src/allmydata/mutable/publish.py | 2 +-
src/allmydata/mutable/servermap.py | 30 ++++++++++++++-----------
2 files changed, 18 insertions(+), 14 deletions(-)
commit 520c9368134673cdf76c653c5e1bb91c2ab5d51e
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:10:05 2011 +0100
accessors and name cleanup for servermap.Servermap.servermap .
src/allmydata/mutable/publish.py | 14 +++++----
src/allmydata/mutable/servermap.py | 38 ++++++++++++++-----------
2 files changed, 29 insertions(+), 23 deletions(-)
commit b8b8dc38287a91dbdf494426ac801d9381ce5841
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:08:02 2011 +0100
fix reachable_servers
src/allmydata/mutable/checker.py | 3 ++-
src/allmydata/mutable/publish.py | 4 +++-
src/allmydata/mutable/servermap.py | 12 ++++++++++--
3 files changed, 15 insertions(+), 4 deletions(-)
commit cb0cfd1adfefad357c187aaaf690c3df68b622bc
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:06:03 2011 +0100
fix Servermap.unreachable_servers
src/allmydata/mutable/servermap.py | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
commit 2d9ea79b94bd4db674d40386fda90825785ac495
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:03:48 2011 +0100
give ServerMap a StorageFarmBroker, temporary
this makes it possible for the ServerMap to accept bare serverids and still
build data structures with IServers
src/allmydata/mutable/checker.py | 2 +-
src/allmydata/mutable/filenode.py | 2 +-
src/allmydata/mutable/publish.py | 2 +-
src/allmydata/mutable/servermap.py | 5 +++--
src/allmydata/test/test_mutable.py | 8 ++++----
5 files changed, 10 insertions(+), 9 deletions(-)
commit 718d1aeff6fded893f65397806d22ece928b0dd4
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 13:43:30 2011 -0400
add StorageFarmBroker.get_server_for_id(), temporary helper
This will go away once we're passing IServers everywhere.
src/allmydata/storage_client.py | 2 ++
src/allmydata/test/no_network.py | 13 +++++++++++++
2 files changed, 15 insertions(+), 0 deletions(-)
commit ece20231d7fda0d503704842a4aa068dfbc2e54e
Author: Brian Warner <warner@lothar.com>
Date: Sun Oct 2 01:11:50 2011 +0100
add proper accessors for Servermap.connections, to make refactoring easier
src/allmydata/mutable/publish.py | 6 +++---
src/allmydata/mutable/retrieve.py | 10 +++++-----
src/allmydata/mutable/servermap.py | 17 +++++++++++------
3 files changed, 19 insertions(+), 14 deletions(-)
commit 3b943d6bf302ff702668081a612fc4fe2604cf9c
Author: Brian Warner <warner@lothar.com>
Date: Fri Sep 23 10:34:30 2011 -0700
mutable/servermap.py and neighbors: s/peer/server/
src/allmydata/mutable/checker.py | 22 +-
src/allmydata/mutable/publish.py | 204 +++++++-------
src/allmydata/mutable/servermap.py | 402 +++++++++++++-------------
src/allmydata/test/test_mutable.py | 18 +-
4 files changed, 323 insertions(+), 323 deletions(-)
IServer refactoring: pass IServer instances around, instead of peerids
refs #1363
This collapses 88 small incremental changes (each of which passes all tests)
into one big patch. The development process for the long path started with
adding some temporary scaffolding, changing one method at a time, then
removing the scaffolding. The individual pieces are as follows, in reverse
chronological order (the first patch is at the end of this comment):
commit 9bbe4174fd0d98a6cf47a8ef96e85d9ef34b2f9a
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 16:05:00 2011 -0400
immutable/downloader/status.py: correct comment
src/allmydata/immutable/downloader/status.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
commit 72146a7c7c91eac2f7c3ceb801eb7a1721376889
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 15:46:20 2011 -0400
remove temporary ServerMap._storage_broker
src/allmydata/mutable/checker.py | 2 +-
src/allmydata/mutable/filenode.py | 2 +-
src/allmydata/mutable/publish.py | 2 +-
src/allmydata/mutable/servermap.py | 5 ++---
src/allmydata/test/test_mutable.py | 8 ++++----
5 files changed, 9 insertions(+), 10 deletions(-)
commit d703096b41632c47d76414b12672e076a422ff5c
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 15:37:05 2011 -0400
remove temporary storage_broker.get_server_for_id()
src/allmydata/storage_client.py | 3 ---
src/allmydata/test/no_network.py | 13 -------------
2 files changed, 0 insertions(+), 16 deletions(-)
commit 620cc5d80882ef6f7decfd26af8a6c7c1ddf80d1
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 12:50:06 2011 -0400
API of Retrieve._try_to_validate_privkey(), trying to remove reader.server
src/allmydata/mutable/retrieve.py | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
commit 92f43f856f4a8b36c207d1b190ed8699b5a4ecb4
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 12:48:08 2011 -0400
API of Retrieve._validate_block(), trying to remove reader.server
src/allmydata/mutable/retrieve.py | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
commit 572d5070761861a2190349d1ed8d85dbc25698a5
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 12:36:58 2011 -0400
API of Retrieve._mark_bad_share(), trying to remove reader.server
src/allmydata/mutable/retrieve.py | 21 +++++++++------------
1 files changed, 9 insertions(+), 12 deletions(-)
commit a793ff00c0de1e2eec7b46288fdf388c7a2bec89
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 12:06:13 2011 -0400
remove now-unused get_rref_for_serverid()
src/allmydata/mutable/servermap.py | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
commit 1b9827cc9366bf90b93297fdd6832f2ad0480ce7
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 12:03:09 2011 -0400
Retrieve: stop adding .serverid attributes to readers
src/allmydata/mutable/retrieve.py | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
commit 5d4e9d491b19e49d2e443a1dfff2c672842c36ef
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 12:03:34 2011 -0400
return value of Retrieve(verify=True)
src/allmydata/mutable/checker.py | 11 ++++++-----
src/allmydata/mutable/retrieve.py | 3 +--
2 files changed, 7 insertions(+), 7 deletions(-)
commit e9ab7978c384e1f677cb7779dc449b1044face82
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:54:23 2011 -0400
Retrieve._bad_shares (but not return value, used by Verifier)
src/allmydata/mutable/retrieve.py | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
commit 2d91926de233ec5c881f30e36b4a30ad92ab42a9
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:51:23 2011 -0400
Publish: stop adding .serverid attributes to writers
src/allmydata/mutable/publish.py | 9 ++-------
1 files changed, 2 insertions(+), 7 deletions(-)
commit 47c7a0105dec7cbf4f7e0a3ce800bbb85b15df4a
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:56:33 2011 -0400
API of get_write_enabler()
src/allmydata/mutable/filenode.py | 7 ++++---
src/allmydata/mutable/publish.py | 4 ++--
src/allmydata/test/no_network.py | 3 +++
3 files changed, 9 insertions(+), 5 deletions(-)
commit 9196a5c6590fdbfd660325ea8358b345887d3db0
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:46:24 2011 -0400
API of get_(renewal|cancel)_secret()
src/allmydata/mutable/filenode.py | 14 ++++++++------
src/allmydata/mutable/publish.py | 8 ++++----
src/allmydata/mutable/servermap.py | 5 ++---
3 files changed, 14 insertions(+), 13 deletions(-)
commit de7c1552f8c163eff5b6d820b5fb3b21c1b47cb5
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:41:52 2011 -0400
API of CorruptShareError. Also comment out some related+unused test_web.py code
src/allmydata/mutable/common.py | 13 +++++--------
src/allmydata/mutable/retrieve.py | 10 +++++-----
src/allmydata/mutable/servermap.py | 8 +++-----
src/allmydata/test/common.py | 13 ++++++++-----
4 files changed, 21 insertions(+), 23 deletions(-)
commit 2c1c314046b620c16f1e66d030c150d768b7d01e
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 12:01:46 2011 -0400
API of ServerMap.mark_bad_share()
src/allmydata/mutable/publish.py | 2 +-
src/allmydata/mutable/retrieve.py | 6 +++---
src/allmydata/mutable/servermap.py | 6 ++----
src/allmydata/test/test_mutable.py | 3 +--
4 files changed, 7 insertions(+), 10 deletions(-)
commit 1bed349030779fd0c378ae4e821384f953c6f6ff
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:11:17 2011 -0400
API+name of ServerMap.shares_on_server() : only for tests, so debug_ prefix
src/allmydata/mutable/servermap.py | 7 ++-----
src/allmydata/test/test_mutable.py | 6 +++---
2 files changed, 5 insertions(+), 8 deletions(-)
commit 2d32e448677d6b818692e801045d4115b29abf21
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:07:10 2011 -0400
API of ServerMap.all_servers_for_version()
src/allmydata/mutable/servermap.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
commit 48f3204d1889c3e7179578125c4bdef515af3d6a
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:04:50 2011 -0400
internals of ServerMap methods that use make_versionmap(), remove temp copy
src/allmydata/mutable/servermap.py | 28 +++++++++----------------
1 files changed, 10 insertions(+), 18 deletions(-)
commit 5c3da77b6c777a145bd5ddfaa4db849dc9495548
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:01:28 2011 -0400
API of ServerMap.make_versionmap()
src/allmydata/mutable/checker.py | 4 ++--
src/allmydata/mutable/retrieve.py | 5 ++---
src/allmydata/mutable/servermap.py | 4 ++--
src/allmydata/test/test_mutable.py | 7 ++++---
4 files changed, 10 insertions(+), 10 deletions(-)
commit b6882ece49afb4c507d118af2db346fa329209dc
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 10:53:38 2011 -0400
make a copy of ServerMap.make_versionmap() (_make_versionmap2) for internal use
src/allmydata/mutable/servermap.py | 18 +++++++++++++-----
1 files changed, 13 insertions(+), 5 deletions(-)
commit 963f8e63faf32b950eb1b8103cd2ff16fe8f0151
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:45:58 2011 -0400
API of RetrieveStatus.add_problem()
src/allmydata/mutable/retrieve.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
commit 4976d29ffae565a048851601c29013bbae2976d8
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:45:05 2011 -0400
API of RetrieveStatus.add_fetch_timing()
src/allmydata/mutable/retrieve.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
commit d057d3bbba72663ee148a8b916bc2d52be2e3982
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:44:04 2011 -0400
API of Retrieve.notify_server_corruption()
src/allmydata/mutable/retrieve.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
commit 8a2a81e46671c860610e0e96d6add1a57551f22d
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:42:32 2011 -0400
remove unused _outstanding_queries
src/allmydata/mutable/retrieve.py | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
commit 56d12cc9968d03ccd53764455c671122c4f391d1
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:40:57 2011 -0400
change Retrieve.remaining_sharemap
src/allmydata/mutable/retrieve.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
commit 4f0b7af4821f43290bfc70f2b1fc30149ad81281
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 10:40:18 2011 -0400
accessor for PublishStatus._problems
src/allmydata/mutable/publish.py | 4 +++-
src/allmydata/web/status.py | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
commit 627087cf66d0b8cc519f4d551a967a7bd9b6a741
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 10:36:39 2011 -0400
accessor for RetrieveStatus._problems
src/allmydata/mutable/retrieve.py | 8 ++++++--
src/allmydata/web/status.py | 2 +-
2 files changed, 7 insertions(+), 3 deletions(-)
commit ca7dea81f03801b1c7353fc00ecba689268109cf
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:35:32 2011 -0400
add .server to "reader", so we can get at it later
src/allmydata/mutable/retrieve.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
commit 6ef516e24908ec195af084a7550d1921a5e983b0
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:32:32 2011 -0400
temporarily give Retrieve a _storage_broker, so it can map serverids to servers
src/allmydata/mutable/checker.py | 3 ++-
src/allmydata/mutable/filenode.py | 6 ++++--
src/allmydata/mutable/retrieve.py | 5 +++--
src/allmydata/test/test_mutable.py | 4 ++--
4 files changed, 11 insertions(+), 7 deletions(-)
commit afe08e4dd3f4ff9ff7e8a2a8d28b181e3625bcc9
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:21:51 2011 -0400
mutable/retrieve.py: s/peer/server/
src/allmydata/mutable/retrieve.py | 82 +++++++++++++-------------
src/allmydata/test/test_mutable.py | 6 +-
2 files changed, 44 insertions(+), 44 deletions(-)
commit 910afcb5d7f274880f68dd6cdb5b05f2bbc29adc
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:16:01 2011 -0400
web.status.PublishStatusPage: add comment, I think .problems isn't exercised
src/allmydata/web/status.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
commit 311466dd8c931bbba40d590ade867704282e7f1a
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:48:16 2011 -0400
API of PublishStatus.add_per_server_time()
src/allmydata/mutable/publish.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
commit 2df5faa1b6cbfbaded520d2320305a62fe961118
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:46:37 2011 -0400
more simplifications
src/allmydata/mutable/publish.py | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
commit 6ac4544a3da385f2aad9392f906b90192f4f919a
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:44:08 2011 -0400
API of ServerMap.version_on_server()
src/allmydata/mutable/publish.py | 2 +-
src/allmydata/mutable/servermap.py | 4 ++--
src/allmydata/test/test_mutable.py | 5 ++---
3 files changed, 5 insertions(+), 6 deletions(-)
commit 3e187e322511072e4683329df6b2c6c733a66dba
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:16:32 2011 -0400
API of ServerMap.make_sharemap()
src/allmydata/mutable/servermap.py | 4 ++--
src/allmydata/test/test_mutable.py | 7 ++++---
src/allmydata/web/status.py | 4 ++--
3 files changed, 8 insertions(+), 7 deletions(-)
commit 318feed8437bdd8d4943c6569d38f7b54b6313cc
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:36:19 2011 -0400
small cleanups
src/allmydata/mutable/publish.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
commit bd459ed5714e1db5a7163935c54b7b0b56db8349
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:33:39 2011 -0400
API of ServerMap.add_new_share()
src/allmydata/mutable/publish.py | 4 ++--
src/allmydata/mutable/servermap.py | 6 ++----
2 files changed, 4 insertions(+), 6 deletions(-)
commit f2804fb6ed11d80088e0da8ed48e6c2922f2ffef
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:30:26 2011 -0400
API of ServerMap.get_bad_shares()
src/allmydata/mutable/publish.py | 3 +--
src/allmydata/mutable/servermap.py | 9 ++++-----
2 files changed, 5 insertions(+), 7 deletions(-)
commit 965074a47b3ce1431cb46d9a233840afcf9105f5
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:26:58 2011 -0400
more small cleanups
src/allmydata/mutable/publish.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
commit 38020da34f034f8889947dd3dc05e087ffff7106
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:18:47 2011 -0400
change Publish.bad_share_checkstrings
src/allmydata/mutable/publish.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
commit 5efebcbd2ee0c2f299ea86f7591d856c0f265304
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:16:31 2011 -0400
change internals of Publish.update_goal()
src/allmydata/mutable/publish.py | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
commit e91b55ff4c2a69165b71f2c7b217ac319ff4c527
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:11:42 2011 -0400
get rid of Publish.connections
src/allmydata/mutable/publish.py | 27 +++++----------------------
1 files changed, 5 insertions(+), 22 deletions(-)
commit 64e9a53b3229ebe2f9ebf7ed502d539311d0e037
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:05:32 2011 -0400
change Publish.bad_servers
src/allmydata/mutable/publish.py | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
commit b85a934bef315a06bcfe00c9c12a3627fed2b918
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:03:07 2011 -0400
Publish.bad_servers: fix bug, this should be a set of serverids, not writers
src/allmydata/mutable/publish.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
commit 605ea15ec15ed671513819003ccd211cdb9761e0
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:00:21 2011 -0400
change .placed
src/allmydata/mutable/publish.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
commit f7aba37b1b345d5b6d5cb16e3b3f6f3c1afb658e
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 22:59:22 2011 -0400
temporarily stash IServer as .server on the "writer" object
src/allmydata/mutable/publish.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
commit f9b551d788e7db1f187fce5ab98ab5d5fe4e1c36
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 22:48:18 2011 -0400
change Publish.goal and API of log_goal() to use IServer, not serverid
src/allmydata/mutable/publish.py | 48 ++++++++++++++--------------
1 files changed, 24 insertions(+), 24 deletions(-)
commit 75f20616558e4900b8b1f685dd99aa838de6d452
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:27:02 2011 -0400
API of ServerMap.get_known_shares()
src/allmydata/mutable/publish.py | 16 ++++++++++------
src/allmydata/mutable/servermap.py | 7 ++-----
2 files changed, 12 insertions(+), 11 deletions(-)
commit 1c38c9d37bb08221b4418762234b1a62397b3b4b
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:20:29 2011 -0400
Publish.full_serverlist
src/allmydata/mutable/publish.py | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
commit b6cbd215a04b9cde31a7d92a97a7f048622b16f1
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:12:31 2011 -0400
API of ServerMap.all_servers()
src/allmydata/mutable/servermap.py | 19 ++++++-------------
1 files changed, 6 insertions(+), 13 deletions(-)
commit e63cd0315fae65357b1727ec6d5ff3c6e0d27c98
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:10:18 2011 -0400
remove ServerMap.connections, set_rref_for_serverid()
src/allmydata/mutable/servermap.py | 11 +----------
1 files changed, 1 insertions(+), 10 deletions(-)
commit 4df52db2f80eb12eefa5d57103c24893cde89553
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:04:06 2011 -0400
API of ServerMap.mark_server_reachable()
src/allmydata/mutable/servermap.py | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
commit 69c715bde77944dc25181b3dbbeb042c816f9a1b
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:03:21 2011 -0400
API of ServerMap.mark_server_unreachable()
src/allmydata/mutable/servermap.py | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
commit 3d784d60eec1c508858e3a617e4411ffbcc3c1fa
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:02:03 2011 -0400
API of status.set_privkey_from()
src/allmydata/mutable/servermap.py | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
commit 544ed3ea29bed7e66da7fd29ca3f6f076f27a9e6
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:01:15 2011 -0400
API of status.add_per_server_time()
src/allmydata/mutable/servermap.py | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
commit fffe5008b6320bd1e04c3c68389a2bf2ee383fa8
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:59:02 2011 -0400
remove unused .versionmap
src/allmydata/mutable/servermap.py | 7 -------
1 files changed, 0 insertions(+), 7 deletions(-)
commit 2816562e090d2294179db3588dafcca18de1bc2b
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:57:51 2011 -0400
remove serverid from all log messages. Also one unused lambda.
src/allmydata/mutable/servermap.py | 30 +++++++++++++-------------
1 files changed, 15 insertions(+), 15 deletions(-)
commit 28fa6b1a2738fa98c1f1dbd3d0e01ae98912d11f
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:54:30 2011 -0400
removed unused _readers
src/allmydata/mutable/servermap.py | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
commit a8e4ed3d645ab592d1add6a1e69b6d1ebfb77817
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:54:16 2011 -0400
remove unused _sharemap
src/allmydata/mutable/servermap.py | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
commit 3f072e55cf1d0700f9fffe23f8f3a475725df588
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:49:03 2011 -0400
_must_query
src/allmydata/mutable/servermap.py | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
commit c599a059b8df3f5785e4bf89fb6ecc6d8dcd708b
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:48:05 2011 -0400
_queries_outstanding
src/allmydata/mutable/servermap.py | 16 +++++++---------
1 files changed, 7 insertions(+), 9 deletions(-)
commit 7743759f98ac2c07926b2fdbd80bf52dfab33085
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:46:17 2011 -0400
_empty_servers
src/allmydata/mutable/servermap.py | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
commit 6bb1825916828a713a32cdf7f7411fa3ea2e1e5d
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:45:39 2011 -0400
_good_servers
src/allmydata/mutable/servermap.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
commit 1768fab1b51d8dd93ecabbaaabfadfa20cf6c3d4
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:44:59 2011 -0400
_bad_servers
src/allmydata/mutable/servermap.py | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
commit dccbaef30f0ba714c746bf6d4a1a803c36e17b65
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:41:54 2011 -0400
API of _try_to_set_pubkey()
src/allmydata/mutable/servermap.py | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
commit 0481ea70042ba3575f15eac7fd0780f8ece580cc
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:35:02 2011 -0400
API of notify_server_corruption()
src/allmydata/mutable/servermap.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
commit bea9cba18fb3b9c11bb22f18356a263ecec7351e
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:34:09 2011 -0400
API of _got_signature_one_share()
src/allmydata/mutable/servermap.py | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
commit 1520123583cf78650706e114b15bb5b0ac1f4a14
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:32:33 2011 -0400
API of _try_to_validate_privkey()
src/allmydata/mutable/servermap.py | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
commit 938852c9c8519c7a078f58a9b1f4dd8ec8b6715e
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:31:48 2011 -0400
API and internals of _add_lease_failed()
src/allmydata/mutable/servermap.py | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
commit 3843dba367e3c19e176a622ab853cb51d2472ddf
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:30:37 2011 -0400
API of _privkey_query_failed()
src/allmydata/mutable/servermap.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
commit 2219a710e1633cd57d0ca0786490de87b3e19ba7
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:29:43 2011 -0400
fix bug in call to _privkey_query_failed, unrelated to refactoring
src/allmydata/mutable/servermap.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
commit ae615bec7d0d1b269710b6902797b12f9592ad62
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:27:17 2011 -0400
API of _got_corrupt_share()
src/allmydata/mutable/servermap.py | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)
commit cb51c95a6f4e077278157a77dab060c8c1ad7a81
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:23:16 2011 -0400
API of _got_results()
src/allmydata/mutable/servermap.py | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
commit bac9154fe0af18f226999a58ffc2362d8cf4b802
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:19:19 2011 -0400
API of _query_failed()
src/allmydata/mutable/servermap.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
commit fdc29a8ca95d4b5c503e5382b9e5d4d02141ba12
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:17:20 2011 -0400
API of _do_read()
src/allmydata/mutable/servermap.py | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
commit e7e9e338f28d004aa4d423d11c65f1e271ac7322
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:20:21 2011 -0400
API of _do_query()
src/allmydata/mutable/servermap.py | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
commit 330625b9dac4cdbe72a11464a893065b9aeed453
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:43:05 2011 -0400
next step: first batch of updates to ServermapUpdater
updates:
most method-local variables in update()
API of _build_initial_querylist()
API of _send_initial_requests()
.full_serverlist
.extra_servers
src/allmydata/mutable/servermap.py | 39 ++++++++++++++------------
1 files changed, 21 insertions(+), 18 deletions(-)
commit 4aadc584fa7dcb2daa86b048c81dee0049ba26d9
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:07:00 2011 -0400
internal change: index _bad_shares with IServer
src/allmydata/mutable/servermap.py | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
commit 16d4e6fa82a9907dbdc92094213387c6a4164e41
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:20:47 2011 +0100
internal change: index _known_shares with IServer instead of serverid
callers are unchanged
src/allmydata/mutable/servermap.py | 42 +++++++++++++++----------
1 files changed, 25 insertions(+), 17 deletions(-)
commit ceeb5f4938cc814a0c75d1b8f4018aed965c2176
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:11:43 2011 +0100
accessors and name cleanup for servermap.Servermap.last_update_mode/time
src/allmydata/mutable/filenode.py | 6 +++---
src/allmydata/mutable/publish.py | 4 ++--
src/allmydata/mutable/servermap.py | 17 +++++++++++------
3 files changed, 16 insertions(+), 11 deletions(-)
commit 8d3cbda82661c0a7e5c3d3b65cf7a5d5ab7e32c0
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:11:14 2011 +0100
accessors and name cleanup for servermap.Servermap.problems
src/allmydata/mutable/servermap.py | 21 +++++++++++++--------
src/allmydata/test/test_mutable.py | 6 +++---
2 files changed, 16 insertions(+), 11 deletions(-)
commit 348f57988f79389db0aab7672e6eaa9a6d8e3219
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:10:41 2011 +0100
accessors and name cleanup for servermap.Servermap.bad_shares
src/allmydata/mutable/publish.py | 2 +-
src/allmydata/mutable/servermap.py | 30 ++++++++++++++-----------
2 files changed, 18 insertions(+), 14 deletions(-)
commit 520c9368134673cdf76c653c5e1bb91c2ab5d51e
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:10:05 2011 +0100
accessors and name cleanup for servermap.Servermap.servermap .
src/allmydata/mutable/publish.py | 14 +++++----
src/allmydata/mutable/servermap.py | 38 ++++++++++++++-----------
2 files changed, 29 insertions(+), 23 deletions(-)
commit b8b8dc38287a91dbdf494426ac801d9381ce5841
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:08:02 2011 +0100
fix reachable_servers
src/allmydata/mutable/checker.py | 3 ++-
src/allmydata/mutable/publish.py | 4 +++-
src/allmydata/mutable/servermap.py | 12 ++++++++++--
3 files changed, 15 insertions(+), 4 deletions(-)
commit cb0cfd1adfefad357c187aaaf690c3df68b622bc
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:06:03 2011 +0100
fix Servermap.unreachable_servers
src/allmydata/mutable/servermap.py | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
commit 2d9ea79b94bd4db674d40386fda90825785ac495
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:03:48 2011 +0100
give ServerMap a StorageFarmBroker, temporary
this makes it possible for the ServerMap to accept bare serverids and still
build data structures with IServers
src/allmydata/mutable/checker.py | 2 +-
src/allmydata/mutable/filenode.py | 2 +-
src/allmydata/mutable/publish.py | 2 +-
src/allmydata/mutable/servermap.py | 5 +++--
src/allmydata/test/test_mutable.py | 8 ++++----
5 files changed, 10 insertions(+), 9 deletions(-)
commit 718d1aeff6fded893f65397806d22ece928b0dd4
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 13:43:30 2011 -0400
add StorageFarmBroker.get_server_for_id(), temporary helper
This will go away once we're passing IServers everywhere.
src/allmydata/storage_client.py | 2 ++
src/allmydata/test/no_network.py | 13 +++++++++++++
2 files changed, 15 insertions(+), 0 deletions(-)
commit ece20231d7fda0d503704842a4aa068dfbc2e54e
Author: Brian Warner <warner@lothar.com>
Date: Sun Oct 2 01:11:50 2011 +0100
add proper accessors for Servermap.connections, to make refactoring easier
src/allmydata/mutable/publish.py | 6 +++---
src/allmydata/mutable/retrieve.py | 10 +++++-----
src/allmydata/mutable/servermap.py | 17 +++++++++++------
3 files changed, 19 insertions(+), 14 deletions(-)
commit 3b943d6bf302ff702668081a612fc4fe2604cf9c
Author: Brian Warner <warner@lothar.com>
Date: Fri Sep 23 10:34:30 2011 -0700
mutable/servermap.py and neighbors: s/peer/server/
src/allmydata/mutable/checker.py | 22 +-
src/allmydata/mutable/publish.py | 204 +++++++-------
src/allmydata/mutable/servermap.py | 402 +++++++++++++-------------
src/allmydata/test/test_mutable.py | 18 +-
4 files changed, 323 insertions(+), 323 deletions(-)
2011-11-01 04:03:19 +00:00
|
|
|
", ".join(["[%s]" % server.get_name()
|
|
|
|
for server in sharemap[shnum]])]]
|
2008-03-06 01:41:10 +00:00
|
|
|
return ctx.tag["Sharemap:", l]
|
|
|
|
|
|
|
|
def render_problems(self, ctx, data):
|
IServer refactoring: pass IServer instances around, instead of peerids
refs #1363
This collapses 88 small incremental changes (each of which passes all tests)
into one big patch. The development process for the long path started with
adding some temporary scaffolding, changing one method at a time, then
removing the scaffolding. The individual pieces are as follows, in reverse
chronological order (the first patch is at the end of this comment):
commit 9bbe4174fd0d98a6cf47a8ef96e85d9ef34b2f9a
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 16:05:00 2011 -0400
immutable/downloader/status.py: correct comment
src/allmydata/immutable/downloader/status.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
commit 72146a7c7c91eac2f7c3ceb801eb7a1721376889
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 15:46:20 2011 -0400
remove temporary ServerMap._storage_broker
src/allmydata/mutable/checker.py | 2 +-
src/allmydata/mutable/filenode.py | 2 +-
src/allmydata/mutable/publish.py | 2 +-
src/allmydata/mutable/servermap.py | 5 ++---
src/allmydata/test/test_mutable.py | 8 ++++----
5 files changed, 9 insertions(+), 10 deletions(-)
commit d703096b41632c47d76414b12672e076a422ff5c
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 15:37:05 2011 -0400
remove temporary storage_broker.get_server_for_id()
src/allmydata/storage_client.py | 3 ---
src/allmydata/test/no_network.py | 13 -------------
2 files changed, 0 insertions(+), 16 deletions(-)
commit 620cc5d80882ef6f7decfd26af8a6c7c1ddf80d1
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 12:50:06 2011 -0400
API of Retrieve._try_to_validate_privkey(), trying to remove reader.server
src/allmydata/mutable/retrieve.py | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
commit 92f43f856f4a8b36c207d1b190ed8699b5a4ecb4
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 12:48:08 2011 -0400
API of Retrieve._validate_block(), trying to remove reader.server
src/allmydata/mutable/retrieve.py | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
commit 572d5070761861a2190349d1ed8d85dbc25698a5
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 12:36:58 2011 -0400
API of Retrieve._mark_bad_share(), trying to remove reader.server
src/allmydata/mutable/retrieve.py | 21 +++++++++------------
1 files changed, 9 insertions(+), 12 deletions(-)
commit a793ff00c0de1e2eec7b46288fdf388c7a2bec89
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 12:06:13 2011 -0400
remove now-unused get_rref_for_serverid()
src/allmydata/mutable/servermap.py | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
commit 1b9827cc9366bf90b93297fdd6832f2ad0480ce7
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 12:03:09 2011 -0400
Retrieve: stop adding .serverid attributes to readers
src/allmydata/mutable/retrieve.py | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
commit 5d4e9d491b19e49d2e443a1dfff2c672842c36ef
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 12:03:34 2011 -0400
return value of Retrieve(verify=True)
src/allmydata/mutable/checker.py | 11 ++++++-----
src/allmydata/mutable/retrieve.py | 3 +--
2 files changed, 7 insertions(+), 7 deletions(-)
commit e9ab7978c384e1f677cb7779dc449b1044face82
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:54:23 2011 -0400
Retrieve._bad_shares (but not return value, used by Verifier)
src/allmydata/mutable/retrieve.py | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
commit 2d91926de233ec5c881f30e36b4a30ad92ab42a9
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:51:23 2011 -0400
Publish: stop adding .serverid attributes to writers
src/allmydata/mutable/publish.py | 9 ++-------
1 files changed, 2 insertions(+), 7 deletions(-)
commit 47c7a0105dec7cbf4f7e0a3ce800bbb85b15df4a
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:56:33 2011 -0400
API of get_write_enabler()
src/allmydata/mutable/filenode.py | 7 ++++---
src/allmydata/mutable/publish.py | 4 ++--
src/allmydata/test/no_network.py | 3 +++
3 files changed, 9 insertions(+), 5 deletions(-)
commit 9196a5c6590fdbfd660325ea8358b345887d3db0
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:46:24 2011 -0400
API of get_(renewal|cancel)_secret()
src/allmydata/mutable/filenode.py | 14 ++++++++------
src/allmydata/mutable/publish.py | 8 ++++----
src/allmydata/mutable/servermap.py | 5 ++---
3 files changed, 14 insertions(+), 13 deletions(-)
commit de7c1552f8c163eff5b6d820b5fb3b21c1b47cb5
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:41:52 2011 -0400
API of CorruptShareError. Also comment out some related+unused test_web.py code
src/allmydata/mutable/common.py | 13 +++++--------
src/allmydata/mutable/retrieve.py | 10 +++++-----
src/allmydata/mutable/servermap.py | 8 +++-----
src/allmydata/test/common.py | 13 ++++++++-----
4 files changed, 21 insertions(+), 23 deletions(-)
commit 2c1c314046b620c16f1e66d030c150d768b7d01e
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 12:01:46 2011 -0400
API of ServerMap.mark_bad_share()
src/allmydata/mutable/publish.py | 2 +-
src/allmydata/mutable/retrieve.py | 6 +++---
src/allmydata/mutable/servermap.py | 6 ++----
src/allmydata/test/test_mutable.py | 3 +--
4 files changed, 7 insertions(+), 10 deletions(-)
commit 1bed349030779fd0c378ae4e821384f953c6f6ff
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:11:17 2011 -0400
API+name of ServerMap.shares_on_server() : only for tests, so debug_ prefix
src/allmydata/mutable/servermap.py | 7 ++-----
src/allmydata/test/test_mutable.py | 6 +++---
2 files changed, 5 insertions(+), 8 deletions(-)
commit 2d32e448677d6b818692e801045d4115b29abf21
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:07:10 2011 -0400
API of ServerMap.all_servers_for_version()
src/allmydata/mutable/servermap.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
commit 48f3204d1889c3e7179578125c4bdef515af3d6a
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:04:50 2011 -0400
internals of ServerMap methods that use make_versionmap(), remove temp copy
src/allmydata/mutable/servermap.py | 28 +++++++++----------------
1 files changed, 10 insertions(+), 18 deletions(-)
commit 5c3da77b6c777a145bd5ddfaa4db849dc9495548
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:01:28 2011 -0400
API of ServerMap.make_versionmap()
src/allmydata/mutable/checker.py | 4 ++--
src/allmydata/mutable/retrieve.py | 5 ++---
src/allmydata/mutable/servermap.py | 4 ++--
src/allmydata/test/test_mutable.py | 7 ++++---
4 files changed, 10 insertions(+), 10 deletions(-)
commit b6882ece49afb4c507d118af2db346fa329209dc
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 10:53:38 2011 -0400
make a copy of ServerMap.make_versionmap() (_make_versionmap2) for internal use
src/allmydata/mutable/servermap.py | 18 +++++++++++++-----
1 files changed, 13 insertions(+), 5 deletions(-)
commit 963f8e63faf32b950eb1b8103cd2ff16fe8f0151
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:45:58 2011 -0400
API of RetrieveStatus.add_problem()
src/allmydata/mutable/retrieve.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
commit 4976d29ffae565a048851601c29013bbae2976d8
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:45:05 2011 -0400
API of RetrieveStatus.add_fetch_timing()
src/allmydata/mutable/retrieve.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
commit d057d3bbba72663ee148a8b916bc2d52be2e3982
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:44:04 2011 -0400
API of Retrieve.notify_server_corruption()
src/allmydata/mutable/retrieve.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
commit 8a2a81e46671c860610e0e96d6add1a57551f22d
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:42:32 2011 -0400
remove unused _outstanding_queries
src/allmydata/mutable/retrieve.py | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
commit 56d12cc9968d03ccd53764455c671122c4f391d1
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:40:57 2011 -0400
change Retrieve.remaining_sharemap
src/allmydata/mutable/retrieve.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
commit 4f0b7af4821f43290bfc70f2b1fc30149ad81281
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 10:40:18 2011 -0400
accessor for PublishStatus._problems
src/allmydata/mutable/publish.py | 4 +++-
src/allmydata/web/status.py | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
commit 627087cf66d0b8cc519f4d551a967a7bd9b6a741
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 10:36:39 2011 -0400
accessor for RetrieveStatus._problems
src/allmydata/mutable/retrieve.py | 8 ++++++--
src/allmydata/web/status.py | 2 +-
2 files changed, 7 insertions(+), 3 deletions(-)
commit ca7dea81f03801b1c7353fc00ecba689268109cf
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:35:32 2011 -0400
add .server to "reader", so we can get at it later
src/allmydata/mutable/retrieve.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
commit 6ef516e24908ec195af084a7550d1921a5e983b0
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:32:32 2011 -0400
temporarily give Retrieve a _storage_broker, so it can map serverids to servers
src/allmydata/mutable/checker.py | 3 ++-
src/allmydata/mutable/filenode.py | 6 ++++--
src/allmydata/mutable/retrieve.py | 5 +++--
src/allmydata/test/test_mutable.py | 4 ++--
4 files changed, 11 insertions(+), 7 deletions(-)
commit afe08e4dd3f4ff9ff7e8a2a8d28b181e3625bcc9
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:21:51 2011 -0400
mutable/retrieve.py: s/peer/server/
src/allmydata/mutable/retrieve.py | 82 +++++++++++++-------------
src/allmydata/test/test_mutable.py | 6 +-
2 files changed, 44 insertions(+), 44 deletions(-)
commit 910afcb5d7f274880f68dd6cdb5b05f2bbc29adc
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:16:01 2011 -0400
web.status.PublishStatusPage: add comment, I think .problems isn't exercised
src/allmydata/web/status.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
commit 311466dd8c931bbba40d590ade867704282e7f1a
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:48:16 2011 -0400
API of PublishStatus.add_per_server_time()
src/allmydata/mutable/publish.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
commit 2df5faa1b6cbfbaded520d2320305a62fe961118
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:46:37 2011 -0400
more simplifications
src/allmydata/mutable/publish.py | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
commit 6ac4544a3da385f2aad9392f906b90192f4f919a
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:44:08 2011 -0400
API of ServerMap.version_on_server()
src/allmydata/mutable/publish.py | 2 +-
src/allmydata/mutable/servermap.py | 4 ++--
src/allmydata/test/test_mutable.py | 5 ++---
3 files changed, 5 insertions(+), 6 deletions(-)
commit 3e187e322511072e4683329df6b2c6c733a66dba
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:16:32 2011 -0400
API of ServerMap.make_sharemap()
src/allmydata/mutable/servermap.py | 4 ++--
src/allmydata/test/test_mutable.py | 7 ++++---
src/allmydata/web/status.py | 4 ++--
3 files changed, 8 insertions(+), 7 deletions(-)
commit 318feed8437bdd8d4943c6569d38f7b54b6313cc
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:36:19 2011 -0400
small cleanups
src/allmydata/mutable/publish.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
commit bd459ed5714e1db5a7163935c54b7b0b56db8349
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:33:39 2011 -0400
API of ServerMap.add_new_share()
src/allmydata/mutable/publish.py | 4 ++--
src/allmydata/mutable/servermap.py | 6 ++----
2 files changed, 4 insertions(+), 6 deletions(-)
commit f2804fb6ed11d80088e0da8ed48e6c2922f2ffef
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:30:26 2011 -0400
API of ServerMap.get_bad_shares()
src/allmydata/mutable/publish.py | 3 +--
src/allmydata/mutable/servermap.py | 9 ++++-----
2 files changed, 5 insertions(+), 7 deletions(-)
commit 965074a47b3ce1431cb46d9a233840afcf9105f5
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:26:58 2011 -0400
more small cleanups
src/allmydata/mutable/publish.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
commit 38020da34f034f8889947dd3dc05e087ffff7106
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:18:47 2011 -0400
change Publish.bad_share_checkstrings
src/allmydata/mutable/publish.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
commit 5efebcbd2ee0c2f299ea86f7591d856c0f265304
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:16:31 2011 -0400
change internals of Publish.update_goal()
src/allmydata/mutable/publish.py | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
commit e91b55ff4c2a69165b71f2c7b217ac319ff4c527
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:11:42 2011 -0400
get rid of Publish.connections
src/allmydata/mutable/publish.py | 27 +++++----------------------
1 files changed, 5 insertions(+), 22 deletions(-)
commit 64e9a53b3229ebe2f9ebf7ed502d539311d0e037
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:05:32 2011 -0400
change Publish.bad_servers
src/allmydata/mutable/publish.py | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
commit b85a934bef315a06bcfe00c9c12a3627fed2b918
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:03:07 2011 -0400
Publish.bad_servers: fix bug, this should be a set of serverids, not writers
src/allmydata/mutable/publish.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
commit 605ea15ec15ed671513819003ccd211cdb9761e0
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:00:21 2011 -0400
change .placed
src/allmydata/mutable/publish.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
commit f7aba37b1b345d5b6d5cb16e3b3f6f3c1afb658e
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 22:59:22 2011 -0400
temporarily stash IServer as .server on the "writer" object
src/allmydata/mutable/publish.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
commit f9b551d788e7db1f187fce5ab98ab5d5fe4e1c36
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 22:48:18 2011 -0400
change Publish.goal and API of log_goal() to use IServer, not serverid
src/allmydata/mutable/publish.py | 48 ++++++++++++++--------------
1 files changed, 24 insertions(+), 24 deletions(-)
commit 75f20616558e4900b8b1f685dd99aa838de6d452
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:27:02 2011 -0400
API of ServerMap.get_known_shares()
src/allmydata/mutable/publish.py | 16 ++++++++++------
src/allmydata/mutable/servermap.py | 7 ++-----
2 files changed, 12 insertions(+), 11 deletions(-)
commit 1c38c9d37bb08221b4418762234b1a62397b3b4b
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:20:29 2011 -0400
Publish.full_serverlist
src/allmydata/mutable/publish.py | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
commit b6cbd215a04b9cde31a7d92a97a7f048622b16f1
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:12:31 2011 -0400
API of ServerMap.all_servers()
src/allmydata/mutable/servermap.py | 19 ++++++-------------
1 files changed, 6 insertions(+), 13 deletions(-)
commit e63cd0315fae65357b1727ec6d5ff3c6e0d27c98
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:10:18 2011 -0400
remove ServerMap.connections, set_rref_for_serverid()
src/allmydata/mutable/servermap.py | 11 +----------
1 files changed, 1 insertions(+), 10 deletions(-)
commit 4df52db2f80eb12eefa5d57103c24893cde89553
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:04:06 2011 -0400
API of ServerMap.mark_server_reachable()
src/allmydata/mutable/servermap.py | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
commit 69c715bde77944dc25181b3dbbeb042c816f9a1b
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:03:21 2011 -0400
API of ServerMap.mark_server_unreachable()
src/allmydata/mutable/servermap.py | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
commit 3d784d60eec1c508858e3a617e4411ffbcc3c1fa
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:02:03 2011 -0400
API of status.set_privkey_from()
src/allmydata/mutable/servermap.py | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
commit 544ed3ea29bed7e66da7fd29ca3f6f076f27a9e6
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:01:15 2011 -0400
API of status.add_per_server_time()
src/allmydata/mutable/servermap.py | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
commit fffe5008b6320bd1e04c3c68389a2bf2ee383fa8
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:59:02 2011 -0400
remove unused .versionmap
src/allmydata/mutable/servermap.py | 7 -------
1 files changed, 0 insertions(+), 7 deletions(-)
commit 2816562e090d2294179db3588dafcca18de1bc2b
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:57:51 2011 -0400
remove serverid from all log messages. Also one unused lambda.
src/allmydata/mutable/servermap.py | 30 +++++++++++++-------------
1 files changed, 15 insertions(+), 15 deletions(-)
commit 28fa6b1a2738fa98c1f1dbd3d0e01ae98912d11f
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:54:30 2011 -0400
removed unused _readers
src/allmydata/mutable/servermap.py | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
commit a8e4ed3d645ab592d1add6a1e69b6d1ebfb77817
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:54:16 2011 -0400
remove unused _sharemap
src/allmydata/mutable/servermap.py | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
commit 3f072e55cf1d0700f9fffe23f8f3a475725df588
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:49:03 2011 -0400
_must_query
src/allmydata/mutable/servermap.py | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
commit c599a059b8df3f5785e4bf89fb6ecc6d8dcd708b
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:48:05 2011 -0400
_queries_outstanding
src/allmydata/mutable/servermap.py | 16 +++++++---------
1 files changed, 7 insertions(+), 9 deletions(-)
commit 7743759f98ac2c07926b2fdbd80bf52dfab33085
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:46:17 2011 -0400
_empty_servers
src/allmydata/mutable/servermap.py | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
commit 6bb1825916828a713a32cdf7f7411fa3ea2e1e5d
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:45:39 2011 -0400
_good_servers
src/allmydata/mutable/servermap.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
commit 1768fab1b51d8dd93ecabbaaabfadfa20cf6c3d4
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:44:59 2011 -0400
_bad_servers
src/allmydata/mutable/servermap.py | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
commit dccbaef30f0ba714c746bf6d4a1a803c36e17b65
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:41:54 2011 -0400
API of _try_to_set_pubkey()
src/allmydata/mutable/servermap.py | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
commit 0481ea70042ba3575f15eac7fd0780f8ece580cc
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:35:02 2011 -0400
API of notify_server_corruption()
src/allmydata/mutable/servermap.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
commit bea9cba18fb3b9c11bb22f18356a263ecec7351e
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:34:09 2011 -0400
API of _got_signature_one_share()
src/allmydata/mutable/servermap.py | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
commit 1520123583cf78650706e114b15bb5b0ac1f4a14
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:32:33 2011 -0400
API of _try_to_validate_privkey()
src/allmydata/mutable/servermap.py | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
commit 938852c9c8519c7a078f58a9b1f4dd8ec8b6715e
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:31:48 2011 -0400
API and internals of _add_lease_failed()
src/allmydata/mutable/servermap.py | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
commit 3843dba367e3c19e176a622ab853cb51d2472ddf
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:30:37 2011 -0400
API of _privkey_query_failed()
src/allmydata/mutable/servermap.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
commit 2219a710e1633cd57d0ca0786490de87b3e19ba7
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:29:43 2011 -0400
fix bug in call to _privkey_query_failed, unrelated to refactoring
src/allmydata/mutable/servermap.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
commit ae615bec7d0d1b269710b6902797b12f9592ad62
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:27:17 2011 -0400
API of _got_corrupt_share()
src/allmydata/mutable/servermap.py | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)
commit cb51c95a6f4e077278157a77dab060c8c1ad7a81
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:23:16 2011 -0400
API of _got_results()
src/allmydata/mutable/servermap.py | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
commit bac9154fe0af18f226999a58ffc2362d8cf4b802
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:19:19 2011 -0400
API of _query_failed()
src/allmydata/mutable/servermap.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
commit fdc29a8ca95d4b5c503e5382b9e5d4d02141ba12
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:17:20 2011 -0400
API of _do_read()
src/allmydata/mutable/servermap.py | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
commit e7e9e338f28d004aa4d423d11c65f1e271ac7322
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:20:21 2011 -0400
API of _do_query()
src/allmydata/mutable/servermap.py | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
commit 330625b9dac4cdbe72a11464a893065b9aeed453
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:43:05 2011 -0400
next step: first batch of updates to ServermapUpdater
updates:
most method-local variables in update()
API of _build_initial_querylist()
API of _send_initial_requests()
.full_serverlist
.extra_servers
src/allmydata/mutable/servermap.py | 39 ++++++++++++++------------
1 files changed, 21 insertions(+), 18 deletions(-)
commit 4aadc584fa7dcb2daa86b048c81dee0049ba26d9
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:07:00 2011 -0400
internal change: index _bad_shares with IServer
src/allmydata/mutable/servermap.py | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
commit 16d4e6fa82a9907dbdc92094213387c6a4164e41
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:20:47 2011 +0100
internal change: index _known_shares with IServer instead of serverid
callers are unchanged
src/allmydata/mutable/servermap.py | 42 +++++++++++++++----------
1 files changed, 25 insertions(+), 17 deletions(-)
commit ceeb5f4938cc814a0c75d1b8f4018aed965c2176
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:11:43 2011 +0100
accessors and name cleanup for servermap.Servermap.last_update_mode/time
src/allmydata/mutable/filenode.py | 6 +++---
src/allmydata/mutable/publish.py | 4 ++--
src/allmydata/mutable/servermap.py | 17 +++++++++++------
3 files changed, 16 insertions(+), 11 deletions(-)
commit 8d3cbda82661c0a7e5c3d3b65cf7a5d5ab7e32c0
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:11:14 2011 +0100
accessors and name cleanup for servermap.Servermap.problems
src/allmydata/mutable/servermap.py | 21 +++++++++++++--------
src/allmydata/test/test_mutable.py | 6 +++---
2 files changed, 16 insertions(+), 11 deletions(-)
commit 348f57988f79389db0aab7672e6eaa9a6d8e3219
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:10:41 2011 +0100
accessors and name cleanup for servermap.Servermap.bad_shares
src/allmydata/mutable/publish.py | 2 +-
src/allmydata/mutable/servermap.py | 30 ++++++++++++++-----------
2 files changed, 18 insertions(+), 14 deletions(-)
commit 520c9368134673cdf76c653c5e1bb91c2ab5d51e
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:10:05 2011 +0100
accessors and name cleanup for servermap.Servermap.servermap .
src/allmydata/mutable/publish.py | 14 +++++----
src/allmydata/mutable/servermap.py | 38 ++++++++++++++-----------
2 files changed, 29 insertions(+), 23 deletions(-)
commit b8b8dc38287a91dbdf494426ac801d9381ce5841
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:08:02 2011 +0100
fix reachable_servers
src/allmydata/mutable/checker.py | 3 ++-
src/allmydata/mutable/publish.py | 4 +++-
src/allmydata/mutable/servermap.py | 12 ++++++++++--
3 files changed, 15 insertions(+), 4 deletions(-)
commit cb0cfd1adfefad357c187aaaf690c3df68b622bc
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:06:03 2011 +0100
fix Servermap.unreachable_servers
src/allmydata/mutable/servermap.py | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
commit 2d9ea79b94bd4db674d40386fda90825785ac495
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:03:48 2011 +0100
give ServerMap a StorageFarmBroker, temporary
this makes it possible for the ServerMap to accept bare serverids and still
build data structures with IServers
src/allmydata/mutable/checker.py | 2 +-
src/allmydata/mutable/filenode.py | 2 +-
src/allmydata/mutable/publish.py | 2 +-
src/allmydata/mutable/servermap.py | 5 +++--
src/allmydata/test/test_mutable.py | 8 ++++----
5 files changed, 10 insertions(+), 9 deletions(-)
commit 718d1aeff6fded893f65397806d22ece928b0dd4
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 13:43:30 2011 -0400
add StorageFarmBroker.get_server_for_id(), temporary helper
This will go away once we're passing IServers everywhere.
src/allmydata/storage_client.py | 2 ++
src/allmydata/test/no_network.py | 13 +++++++++++++
2 files changed, 15 insertions(+), 0 deletions(-)
commit ece20231d7fda0d503704842a4aa068dfbc2e54e
Author: Brian Warner <warner@lothar.com>
Date: Sun Oct 2 01:11:50 2011 +0100
add proper accessors for Servermap.connections, to make refactoring easier
src/allmydata/mutable/publish.py | 6 +++---
src/allmydata/mutable/retrieve.py | 10 +++++-----
src/allmydata/mutable/servermap.py | 17 +++++++++++------
3 files changed, 19 insertions(+), 14 deletions(-)
commit 3b943d6bf302ff702668081a612fc4fe2604cf9c
Author: Brian Warner <warner@lothar.com>
Date: Fri Sep 23 10:34:30 2011 -0700
mutable/servermap.py and neighbors: s/peer/server/
src/allmydata/mutable/checker.py | 22 +-
src/allmydata/mutable/publish.py | 204 +++++++-------
src/allmydata/mutable/servermap.py | 402 +++++++++++++-------------
src/allmydata/test/test_mutable.py | 18 +-
4 files changed, 323 insertions(+), 323 deletions(-)
IServer refactoring: pass IServer instances around, instead of peerids
refs #1363
This collapses 88 small incremental changes (each of which passes all tests)
into one big patch. The development process for the long path started with
adding some temporary scaffolding, changing one method at a time, then
removing the scaffolding. The individual pieces are as follows, in reverse
chronological order (the first patch is at the end of this comment):
commit 9bbe4174fd0d98a6cf47a8ef96e85d9ef34b2f9a
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 16:05:00 2011 -0400
immutable/downloader/status.py: correct comment
src/allmydata/immutable/downloader/status.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
commit 72146a7c7c91eac2f7c3ceb801eb7a1721376889
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 15:46:20 2011 -0400
remove temporary ServerMap._storage_broker
src/allmydata/mutable/checker.py | 2 +-
src/allmydata/mutable/filenode.py | 2 +-
src/allmydata/mutable/publish.py | 2 +-
src/allmydata/mutable/servermap.py | 5 ++---
src/allmydata/test/test_mutable.py | 8 ++++----
5 files changed, 9 insertions(+), 10 deletions(-)
commit d703096b41632c47d76414b12672e076a422ff5c
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 15:37:05 2011 -0400
remove temporary storage_broker.get_server_for_id()
src/allmydata/storage_client.py | 3 ---
src/allmydata/test/no_network.py | 13 -------------
2 files changed, 0 insertions(+), 16 deletions(-)
commit 620cc5d80882ef6f7decfd26af8a6c7c1ddf80d1
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 12:50:06 2011 -0400
API of Retrieve._try_to_validate_privkey(), trying to remove reader.server
src/allmydata/mutable/retrieve.py | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
commit 92f43f856f4a8b36c207d1b190ed8699b5a4ecb4
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 12:48:08 2011 -0400
API of Retrieve._validate_block(), trying to remove reader.server
src/allmydata/mutable/retrieve.py | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
commit 572d5070761861a2190349d1ed8d85dbc25698a5
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 12:36:58 2011 -0400
API of Retrieve._mark_bad_share(), trying to remove reader.server
src/allmydata/mutable/retrieve.py | 21 +++++++++------------
1 files changed, 9 insertions(+), 12 deletions(-)
commit a793ff00c0de1e2eec7b46288fdf388c7a2bec89
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 12:06:13 2011 -0400
remove now-unused get_rref_for_serverid()
src/allmydata/mutable/servermap.py | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
commit 1b9827cc9366bf90b93297fdd6832f2ad0480ce7
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 12:03:09 2011 -0400
Retrieve: stop adding .serverid attributes to readers
src/allmydata/mutable/retrieve.py | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
commit 5d4e9d491b19e49d2e443a1dfff2c672842c36ef
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 12:03:34 2011 -0400
return value of Retrieve(verify=True)
src/allmydata/mutable/checker.py | 11 ++++++-----
src/allmydata/mutable/retrieve.py | 3 +--
2 files changed, 7 insertions(+), 7 deletions(-)
commit e9ab7978c384e1f677cb7779dc449b1044face82
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:54:23 2011 -0400
Retrieve._bad_shares (but not return value, used by Verifier)
src/allmydata/mutable/retrieve.py | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
commit 2d91926de233ec5c881f30e36b4a30ad92ab42a9
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:51:23 2011 -0400
Publish: stop adding .serverid attributes to writers
src/allmydata/mutable/publish.py | 9 ++-------
1 files changed, 2 insertions(+), 7 deletions(-)
commit 47c7a0105dec7cbf4f7e0a3ce800bbb85b15df4a
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:56:33 2011 -0400
API of get_write_enabler()
src/allmydata/mutable/filenode.py | 7 ++++---
src/allmydata/mutable/publish.py | 4 ++--
src/allmydata/test/no_network.py | 3 +++
3 files changed, 9 insertions(+), 5 deletions(-)
commit 9196a5c6590fdbfd660325ea8358b345887d3db0
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:46:24 2011 -0400
API of get_(renewal|cancel)_secret()
src/allmydata/mutable/filenode.py | 14 ++++++++------
src/allmydata/mutable/publish.py | 8 ++++----
src/allmydata/mutable/servermap.py | 5 ++---
3 files changed, 14 insertions(+), 13 deletions(-)
commit de7c1552f8c163eff5b6d820b5fb3b21c1b47cb5
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:41:52 2011 -0400
API of CorruptShareError. Also comment out some related+unused test_web.py code
src/allmydata/mutable/common.py | 13 +++++--------
src/allmydata/mutable/retrieve.py | 10 +++++-----
src/allmydata/mutable/servermap.py | 8 +++-----
src/allmydata/test/common.py | 13 ++++++++-----
4 files changed, 21 insertions(+), 23 deletions(-)
commit 2c1c314046b620c16f1e66d030c150d768b7d01e
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 12:01:46 2011 -0400
API of ServerMap.mark_bad_share()
src/allmydata/mutable/publish.py | 2 +-
src/allmydata/mutable/retrieve.py | 6 +++---
src/allmydata/mutable/servermap.py | 6 ++----
src/allmydata/test/test_mutable.py | 3 +--
4 files changed, 7 insertions(+), 10 deletions(-)
commit 1bed349030779fd0c378ae4e821384f953c6f6ff
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:11:17 2011 -0400
API+name of ServerMap.shares_on_server() : only for tests, so debug_ prefix
src/allmydata/mutable/servermap.py | 7 ++-----
src/allmydata/test/test_mutable.py | 6 +++---
2 files changed, 5 insertions(+), 8 deletions(-)
commit 2d32e448677d6b818692e801045d4115b29abf21
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:07:10 2011 -0400
API of ServerMap.all_servers_for_version()
src/allmydata/mutable/servermap.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
commit 48f3204d1889c3e7179578125c4bdef515af3d6a
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:04:50 2011 -0400
internals of ServerMap methods that use make_versionmap(), remove temp copy
src/allmydata/mutable/servermap.py | 28 +++++++++----------------
1 files changed, 10 insertions(+), 18 deletions(-)
commit 5c3da77b6c777a145bd5ddfaa4db849dc9495548
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:01:28 2011 -0400
API of ServerMap.make_versionmap()
src/allmydata/mutable/checker.py | 4 ++--
src/allmydata/mutable/retrieve.py | 5 ++---
src/allmydata/mutable/servermap.py | 4 ++--
src/allmydata/test/test_mutable.py | 7 ++++---
4 files changed, 10 insertions(+), 10 deletions(-)
commit b6882ece49afb4c507d118af2db346fa329209dc
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 10:53:38 2011 -0400
make a copy of ServerMap.make_versionmap() (_make_versionmap2) for internal use
src/allmydata/mutable/servermap.py | 18 +++++++++++++-----
1 files changed, 13 insertions(+), 5 deletions(-)
commit 963f8e63faf32b950eb1b8103cd2ff16fe8f0151
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:45:58 2011 -0400
API of RetrieveStatus.add_problem()
src/allmydata/mutable/retrieve.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
commit 4976d29ffae565a048851601c29013bbae2976d8
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:45:05 2011 -0400
API of RetrieveStatus.add_fetch_timing()
src/allmydata/mutable/retrieve.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
commit d057d3bbba72663ee148a8b916bc2d52be2e3982
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:44:04 2011 -0400
API of Retrieve.notify_server_corruption()
src/allmydata/mutable/retrieve.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
commit 8a2a81e46671c860610e0e96d6add1a57551f22d
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:42:32 2011 -0400
remove unused _outstanding_queries
src/allmydata/mutable/retrieve.py | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
commit 56d12cc9968d03ccd53764455c671122c4f391d1
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:40:57 2011 -0400
change Retrieve.remaining_sharemap
src/allmydata/mutable/retrieve.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
commit 4f0b7af4821f43290bfc70f2b1fc30149ad81281
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 10:40:18 2011 -0400
accessor for PublishStatus._problems
src/allmydata/mutable/publish.py | 4 +++-
src/allmydata/web/status.py | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
commit 627087cf66d0b8cc519f4d551a967a7bd9b6a741
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 10:36:39 2011 -0400
accessor for RetrieveStatus._problems
src/allmydata/mutable/retrieve.py | 8 ++++++--
src/allmydata/web/status.py | 2 +-
2 files changed, 7 insertions(+), 3 deletions(-)
commit ca7dea81f03801b1c7353fc00ecba689268109cf
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:35:32 2011 -0400
add .server to "reader", so we can get at it later
src/allmydata/mutable/retrieve.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
commit 6ef516e24908ec195af084a7550d1921a5e983b0
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:32:32 2011 -0400
temporarily give Retrieve a _storage_broker, so it can map serverids to servers
src/allmydata/mutable/checker.py | 3 ++-
src/allmydata/mutable/filenode.py | 6 ++++--
src/allmydata/mutable/retrieve.py | 5 +++--
src/allmydata/test/test_mutable.py | 4 ++--
4 files changed, 11 insertions(+), 7 deletions(-)
commit afe08e4dd3f4ff9ff7e8a2a8d28b181e3625bcc9
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:21:51 2011 -0400
mutable/retrieve.py: s/peer/server/
src/allmydata/mutable/retrieve.py | 82 +++++++++++++-------------
src/allmydata/test/test_mutable.py | 6 +-
2 files changed, 44 insertions(+), 44 deletions(-)
commit 910afcb5d7f274880f68dd6cdb5b05f2bbc29adc
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:16:01 2011 -0400
web.status.PublishStatusPage: add comment, I think .problems isn't exercised
src/allmydata/web/status.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
commit 311466dd8c931bbba40d590ade867704282e7f1a
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:48:16 2011 -0400
API of PublishStatus.add_per_server_time()
src/allmydata/mutable/publish.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
commit 2df5faa1b6cbfbaded520d2320305a62fe961118
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:46:37 2011 -0400
more simplifications
src/allmydata/mutable/publish.py | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
commit 6ac4544a3da385f2aad9392f906b90192f4f919a
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:44:08 2011 -0400
API of ServerMap.version_on_server()
src/allmydata/mutable/publish.py | 2 +-
src/allmydata/mutable/servermap.py | 4 ++--
src/allmydata/test/test_mutable.py | 5 ++---
3 files changed, 5 insertions(+), 6 deletions(-)
commit 3e187e322511072e4683329df6b2c6c733a66dba
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:16:32 2011 -0400
API of ServerMap.make_sharemap()
src/allmydata/mutable/servermap.py | 4 ++--
src/allmydata/test/test_mutable.py | 7 ++++---
src/allmydata/web/status.py | 4 ++--
3 files changed, 8 insertions(+), 7 deletions(-)
commit 318feed8437bdd8d4943c6569d38f7b54b6313cc
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:36:19 2011 -0400
small cleanups
src/allmydata/mutable/publish.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
commit bd459ed5714e1db5a7163935c54b7b0b56db8349
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:33:39 2011 -0400
API of ServerMap.add_new_share()
src/allmydata/mutable/publish.py | 4 ++--
src/allmydata/mutable/servermap.py | 6 ++----
2 files changed, 4 insertions(+), 6 deletions(-)
commit f2804fb6ed11d80088e0da8ed48e6c2922f2ffef
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:30:26 2011 -0400
API of ServerMap.get_bad_shares()
src/allmydata/mutable/publish.py | 3 +--
src/allmydata/mutable/servermap.py | 9 ++++-----
2 files changed, 5 insertions(+), 7 deletions(-)
commit 965074a47b3ce1431cb46d9a233840afcf9105f5
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:26:58 2011 -0400
more small cleanups
src/allmydata/mutable/publish.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
commit 38020da34f034f8889947dd3dc05e087ffff7106
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:18:47 2011 -0400
change Publish.bad_share_checkstrings
src/allmydata/mutable/publish.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
commit 5efebcbd2ee0c2f299ea86f7591d856c0f265304
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:16:31 2011 -0400
change internals of Publish.update_goal()
src/allmydata/mutable/publish.py | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
commit e91b55ff4c2a69165b71f2c7b217ac319ff4c527
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:11:42 2011 -0400
get rid of Publish.connections
src/allmydata/mutable/publish.py | 27 +++++----------------------
1 files changed, 5 insertions(+), 22 deletions(-)
commit 64e9a53b3229ebe2f9ebf7ed502d539311d0e037
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:05:32 2011 -0400
change Publish.bad_servers
src/allmydata/mutable/publish.py | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
commit b85a934bef315a06bcfe00c9c12a3627fed2b918
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:03:07 2011 -0400
Publish.bad_servers: fix bug, this should be a set of serverids, not writers
src/allmydata/mutable/publish.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
commit 605ea15ec15ed671513819003ccd211cdb9761e0
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:00:21 2011 -0400
change .placed
src/allmydata/mutable/publish.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
commit f7aba37b1b345d5b6d5cb16e3b3f6f3c1afb658e
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 22:59:22 2011 -0400
temporarily stash IServer as .server on the "writer" object
src/allmydata/mutable/publish.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
commit f9b551d788e7db1f187fce5ab98ab5d5fe4e1c36
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 22:48:18 2011 -0400
change Publish.goal and API of log_goal() to use IServer, not serverid
src/allmydata/mutable/publish.py | 48 ++++++++++++++--------------
1 files changed, 24 insertions(+), 24 deletions(-)
commit 75f20616558e4900b8b1f685dd99aa838de6d452
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:27:02 2011 -0400
API of ServerMap.get_known_shares()
src/allmydata/mutable/publish.py | 16 ++++++++++------
src/allmydata/mutable/servermap.py | 7 ++-----
2 files changed, 12 insertions(+), 11 deletions(-)
commit 1c38c9d37bb08221b4418762234b1a62397b3b4b
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:20:29 2011 -0400
Publish.full_serverlist
src/allmydata/mutable/publish.py | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
commit b6cbd215a04b9cde31a7d92a97a7f048622b16f1
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:12:31 2011 -0400
API of ServerMap.all_servers()
src/allmydata/mutable/servermap.py | 19 ++++++-------------
1 files changed, 6 insertions(+), 13 deletions(-)
commit e63cd0315fae65357b1727ec6d5ff3c6e0d27c98
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:10:18 2011 -0400
remove ServerMap.connections, set_rref_for_serverid()
src/allmydata/mutable/servermap.py | 11 +----------
1 files changed, 1 insertions(+), 10 deletions(-)
commit 4df52db2f80eb12eefa5d57103c24893cde89553
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:04:06 2011 -0400
API of ServerMap.mark_server_reachable()
src/allmydata/mutable/servermap.py | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
commit 69c715bde77944dc25181b3dbbeb042c816f9a1b
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:03:21 2011 -0400
API of ServerMap.mark_server_unreachable()
src/allmydata/mutable/servermap.py | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
commit 3d784d60eec1c508858e3a617e4411ffbcc3c1fa
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:02:03 2011 -0400
API of status.set_privkey_from()
src/allmydata/mutable/servermap.py | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
commit 544ed3ea29bed7e66da7fd29ca3f6f076f27a9e6
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:01:15 2011 -0400
API of status.add_per_server_time()
src/allmydata/mutable/servermap.py | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
commit fffe5008b6320bd1e04c3c68389a2bf2ee383fa8
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:59:02 2011 -0400
remove unused .versionmap
src/allmydata/mutable/servermap.py | 7 -------
1 files changed, 0 insertions(+), 7 deletions(-)
commit 2816562e090d2294179db3588dafcca18de1bc2b
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:57:51 2011 -0400
remove serverid from all log messages. Also one unused lambda.
src/allmydata/mutable/servermap.py | 30 +++++++++++++-------------
1 files changed, 15 insertions(+), 15 deletions(-)
commit 28fa6b1a2738fa98c1f1dbd3d0e01ae98912d11f
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:54:30 2011 -0400
removed unused _readers
src/allmydata/mutable/servermap.py | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
commit a8e4ed3d645ab592d1add6a1e69b6d1ebfb77817
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:54:16 2011 -0400
remove unused _sharemap
src/allmydata/mutable/servermap.py | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
commit 3f072e55cf1d0700f9fffe23f8f3a475725df588
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:49:03 2011 -0400
_must_query
src/allmydata/mutable/servermap.py | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
commit c599a059b8df3f5785e4bf89fb6ecc6d8dcd708b
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:48:05 2011 -0400
_queries_outstanding
src/allmydata/mutable/servermap.py | 16 +++++++---------
1 files changed, 7 insertions(+), 9 deletions(-)
commit 7743759f98ac2c07926b2fdbd80bf52dfab33085
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:46:17 2011 -0400
_empty_servers
src/allmydata/mutable/servermap.py | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
commit 6bb1825916828a713a32cdf7f7411fa3ea2e1e5d
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:45:39 2011 -0400
_good_servers
src/allmydata/mutable/servermap.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
commit 1768fab1b51d8dd93ecabbaaabfadfa20cf6c3d4
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:44:59 2011 -0400
_bad_servers
src/allmydata/mutable/servermap.py | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
commit dccbaef30f0ba714c746bf6d4a1a803c36e17b65
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:41:54 2011 -0400
API of _try_to_set_pubkey()
src/allmydata/mutable/servermap.py | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
commit 0481ea70042ba3575f15eac7fd0780f8ece580cc
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:35:02 2011 -0400
API of notify_server_corruption()
src/allmydata/mutable/servermap.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
commit bea9cba18fb3b9c11bb22f18356a263ecec7351e
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:34:09 2011 -0400
API of _got_signature_one_share()
src/allmydata/mutable/servermap.py | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
commit 1520123583cf78650706e114b15bb5b0ac1f4a14
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:32:33 2011 -0400
API of _try_to_validate_privkey()
src/allmydata/mutable/servermap.py | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
commit 938852c9c8519c7a078f58a9b1f4dd8ec8b6715e
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:31:48 2011 -0400
API and internals of _add_lease_failed()
src/allmydata/mutable/servermap.py | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
commit 3843dba367e3c19e176a622ab853cb51d2472ddf
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:30:37 2011 -0400
API of _privkey_query_failed()
src/allmydata/mutable/servermap.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
commit 2219a710e1633cd57d0ca0786490de87b3e19ba7
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:29:43 2011 -0400
fix bug in call to _privkey_query_failed, unrelated to refactoring
src/allmydata/mutable/servermap.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
commit ae615bec7d0d1b269710b6902797b12f9592ad62
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:27:17 2011 -0400
API of _got_corrupt_share()
src/allmydata/mutable/servermap.py | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)
commit cb51c95a6f4e077278157a77dab060c8c1ad7a81
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:23:16 2011 -0400
API of _got_results()
src/allmydata/mutable/servermap.py | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
commit bac9154fe0af18f226999a58ffc2362d8cf4b802
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:19:19 2011 -0400
API of _query_failed()
src/allmydata/mutable/servermap.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
commit fdc29a8ca95d4b5c503e5382b9e5d4d02141ba12
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:17:20 2011 -0400
API of _do_read()
src/allmydata/mutable/servermap.py | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
commit e7e9e338f28d004aa4d423d11c65f1e271ac7322
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:20:21 2011 -0400
API of _do_query()
src/allmydata/mutable/servermap.py | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
commit 330625b9dac4cdbe72a11464a893065b9aeed453
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:43:05 2011 -0400
next step: first batch of updates to ServermapUpdater
updates:
most method-local variables in update()
API of _build_initial_querylist()
API of _send_initial_requests()
.full_serverlist
.extra_servers
src/allmydata/mutable/servermap.py | 39 ++++++++++++++------------
1 files changed, 21 insertions(+), 18 deletions(-)
commit 4aadc584fa7dcb2daa86b048c81dee0049ba26d9
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:07:00 2011 -0400
internal change: index _bad_shares with IServer
src/allmydata/mutable/servermap.py | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
commit 16d4e6fa82a9907dbdc92094213387c6a4164e41
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:20:47 2011 +0100
internal change: index _known_shares with IServer instead of serverid
callers are unchanged
src/allmydata/mutable/servermap.py | 42 +++++++++++++++----------
1 files changed, 25 insertions(+), 17 deletions(-)
commit ceeb5f4938cc814a0c75d1b8f4018aed965c2176
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:11:43 2011 +0100
accessors and name cleanup for servermap.Servermap.last_update_mode/time
src/allmydata/mutable/filenode.py | 6 +++---
src/allmydata/mutable/publish.py | 4 ++--
src/allmydata/mutable/servermap.py | 17 +++++++++++------
3 files changed, 16 insertions(+), 11 deletions(-)
commit 8d3cbda82661c0a7e5c3d3b65cf7a5d5ab7e32c0
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:11:14 2011 +0100
accessors and name cleanup for servermap.Servermap.problems
src/allmydata/mutable/servermap.py | 21 +++++++++++++--------
src/allmydata/test/test_mutable.py | 6 +++---
2 files changed, 16 insertions(+), 11 deletions(-)
commit 348f57988f79389db0aab7672e6eaa9a6d8e3219
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:10:41 2011 +0100
accessors and name cleanup for servermap.Servermap.bad_shares
src/allmydata/mutable/publish.py | 2 +-
src/allmydata/mutable/servermap.py | 30 ++++++++++++++-----------
2 files changed, 18 insertions(+), 14 deletions(-)
commit 520c9368134673cdf76c653c5e1bb91c2ab5d51e
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:10:05 2011 +0100
accessors and name cleanup for servermap.Servermap.servermap .
src/allmydata/mutable/publish.py | 14 +++++----
src/allmydata/mutable/servermap.py | 38 ++++++++++++++-----------
2 files changed, 29 insertions(+), 23 deletions(-)
commit b8b8dc38287a91dbdf494426ac801d9381ce5841
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:08:02 2011 +0100
fix reachable_servers
src/allmydata/mutable/checker.py | 3 ++-
src/allmydata/mutable/publish.py | 4 +++-
src/allmydata/mutable/servermap.py | 12 ++++++++++--
3 files changed, 15 insertions(+), 4 deletions(-)
commit cb0cfd1adfefad357c187aaaf690c3df68b622bc
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:06:03 2011 +0100
fix Servermap.unreachable_servers
src/allmydata/mutable/servermap.py | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
commit 2d9ea79b94bd4db674d40386fda90825785ac495
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:03:48 2011 +0100
give ServerMap a StorageFarmBroker, temporary
this makes it possible for the ServerMap to accept bare serverids and still
build data structures with IServers
src/allmydata/mutable/checker.py | 2 +-
src/allmydata/mutable/filenode.py | 2 +-
src/allmydata/mutable/publish.py | 2 +-
src/allmydata/mutable/servermap.py | 5 +++--
src/allmydata/test/test_mutable.py | 8 ++++----
5 files changed, 10 insertions(+), 9 deletions(-)
commit 718d1aeff6fded893f65397806d22ece928b0dd4
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 13:43:30 2011 -0400
add StorageFarmBroker.get_server_for_id(), temporary helper
This will go away once we're passing IServers everywhere.
src/allmydata/storage_client.py | 2 ++
src/allmydata/test/no_network.py | 13 +++++++++++++
2 files changed, 15 insertions(+), 0 deletions(-)
commit ece20231d7fda0d503704842a4aa068dfbc2e54e
Author: Brian Warner <warner@lothar.com>
Date: Sun Oct 2 01:11:50 2011 +0100
add proper accessors for Servermap.connections, to make refactoring easier
src/allmydata/mutable/publish.py | 6 +++---
src/allmydata/mutable/retrieve.py | 10 +++++-----
src/allmydata/mutable/servermap.py | 17 +++++++++++------
3 files changed, 19 insertions(+), 14 deletions(-)
commit 3b943d6bf302ff702668081a612fc4fe2604cf9c
Author: Brian Warner <warner@lothar.com>
Date: Fri Sep 23 10:34:30 2011 -0700
mutable/servermap.py and neighbors: s/peer/server/
src/allmydata/mutable/checker.py | 22 +-
src/allmydata/mutable/publish.py | 204 +++++++-------
src/allmydata/mutable/servermap.py | 402 +++++++++++++-------------
src/allmydata/test/test_mutable.py | 18 +-
4 files changed, 323 insertions(+), 323 deletions(-)
2011-11-01 04:03:19 +00:00
|
|
|
problems = data.get_problems()
|
2008-03-06 01:41:10 +00:00
|
|
|
if not problems:
|
|
|
|
return ""
|
|
|
|
l = T.ul()
|
IServer refactoring: pass IServer instances around, instead of peerids
refs #1363
This collapses 88 small incremental changes (each of which passes all tests)
into one big patch. The development process for the long path started with
adding some temporary scaffolding, changing one method at a time, then
removing the scaffolding. The individual pieces are as follows, in reverse
chronological order (the first patch is at the end of this comment):
commit 9bbe4174fd0d98a6cf47a8ef96e85d9ef34b2f9a
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 16:05:00 2011 -0400
immutable/downloader/status.py: correct comment
src/allmydata/immutable/downloader/status.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
commit 72146a7c7c91eac2f7c3ceb801eb7a1721376889
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 15:46:20 2011 -0400
remove temporary ServerMap._storage_broker
src/allmydata/mutable/checker.py | 2 +-
src/allmydata/mutable/filenode.py | 2 +-
src/allmydata/mutable/publish.py | 2 +-
src/allmydata/mutable/servermap.py | 5 ++---
src/allmydata/test/test_mutable.py | 8 ++++----
5 files changed, 9 insertions(+), 10 deletions(-)
commit d703096b41632c47d76414b12672e076a422ff5c
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 15:37:05 2011 -0400
remove temporary storage_broker.get_server_for_id()
src/allmydata/storage_client.py | 3 ---
src/allmydata/test/no_network.py | 13 -------------
2 files changed, 0 insertions(+), 16 deletions(-)
commit 620cc5d80882ef6f7decfd26af8a6c7c1ddf80d1
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 12:50:06 2011 -0400
API of Retrieve._try_to_validate_privkey(), trying to remove reader.server
src/allmydata/mutable/retrieve.py | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
commit 92f43f856f4a8b36c207d1b190ed8699b5a4ecb4
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 12:48:08 2011 -0400
API of Retrieve._validate_block(), trying to remove reader.server
src/allmydata/mutable/retrieve.py | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
commit 572d5070761861a2190349d1ed8d85dbc25698a5
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 12:36:58 2011 -0400
API of Retrieve._mark_bad_share(), trying to remove reader.server
src/allmydata/mutable/retrieve.py | 21 +++++++++------------
1 files changed, 9 insertions(+), 12 deletions(-)
commit a793ff00c0de1e2eec7b46288fdf388c7a2bec89
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 12:06:13 2011 -0400
remove now-unused get_rref_for_serverid()
src/allmydata/mutable/servermap.py | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
commit 1b9827cc9366bf90b93297fdd6832f2ad0480ce7
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 12:03:09 2011 -0400
Retrieve: stop adding .serverid attributes to readers
src/allmydata/mutable/retrieve.py | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
commit 5d4e9d491b19e49d2e443a1dfff2c672842c36ef
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 12:03:34 2011 -0400
return value of Retrieve(verify=True)
src/allmydata/mutable/checker.py | 11 ++++++-----
src/allmydata/mutable/retrieve.py | 3 +--
2 files changed, 7 insertions(+), 7 deletions(-)
commit e9ab7978c384e1f677cb7779dc449b1044face82
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:54:23 2011 -0400
Retrieve._bad_shares (but not return value, used by Verifier)
src/allmydata/mutable/retrieve.py | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
commit 2d91926de233ec5c881f30e36b4a30ad92ab42a9
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:51:23 2011 -0400
Publish: stop adding .serverid attributes to writers
src/allmydata/mutable/publish.py | 9 ++-------
1 files changed, 2 insertions(+), 7 deletions(-)
commit 47c7a0105dec7cbf4f7e0a3ce800bbb85b15df4a
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:56:33 2011 -0400
API of get_write_enabler()
src/allmydata/mutable/filenode.py | 7 ++++---
src/allmydata/mutable/publish.py | 4 ++--
src/allmydata/test/no_network.py | 3 +++
3 files changed, 9 insertions(+), 5 deletions(-)
commit 9196a5c6590fdbfd660325ea8358b345887d3db0
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:46:24 2011 -0400
API of get_(renewal|cancel)_secret()
src/allmydata/mutable/filenode.py | 14 ++++++++------
src/allmydata/mutable/publish.py | 8 ++++----
src/allmydata/mutable/servermap.py | 5 ++---
3 files changed, 14 insertions(+), 13 deletions(-)
commit de7c1552f8c163eff5b6d820b5fb3b21c1b47cb5
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:41:52 2011 -0400
API of CorruptShareError. Also comment out some related+unused test_web.py code
src/allmydata/mutable/common.py | 13 +++++--------
src/allmydata/mutable/retrieve.py | 10 +++++-----
src/allmydata/mutable/servermap.py | 8 +++-----
src/allmydata/test/common.py | 13 ++++++++-----
4 files changed, 21 insertions(+), 23 deletions(-)
commit 2c1c314046b620c16f1e66d030c150d768b7d01e
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 12:01:46 2011 -0400
API of ServerMap.mark_bad_share()
src/allmydata/mutable/publish.py | 2 +-
src/allmydata/mutable/retrieve.py | 6 +++---
src/allmydata/mutable/servermap.py | 6 ++----
src/allmydata/test/test_mutable.py | 3 +--
4 files changed, 7 insertions(+), 10 deletions(-)
commit 1bed349030779fd0c378ae4e821384f953c6f6ff
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:11:17 2011 -0400
API+name of ServerMap.shares_on_server() : only for tests, so debug_ prefix
src/allmydata/mutable/servermap.py | 7 ++-----
src/allmydata/test/test_mutable.py | 6 +++---
2 files changed, 5 insertions(+), 8 deletions(-)
commit 2d32e448677d6b818692e801045d4115b29abf21
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:07:10 2011 -0400
API of ServerMap.all_servers_for_version()
src/allmydata/mutable/servermap.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
commit 48f3204d1889c3e7179578125c4bdef515af3d6a
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:04:50 2011 -0400
internals of ServerMap methods that use make_versionmap(), remove temp copy
src/allmydata/mutable/servermap.py | 28 +++++++++----------------
1 files changed, 10 insertions(+), 18 deletions(-)
commit 5c3da77b6c777a145bd5ddfaa4db849dc9495548
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:01:28 2011 -0400
API of ServerMap.make_versionmap()
src/allmydata/mutable/checker.py | 4 ++--
src/allmydata/mutable/retrieve.py | 5 ++---
src/allmydata/mutable/servermap.py | 4 ++--
src/allmydata/test/test_mutable.py | 7 ++++---
4 files changed, 10 insertions(+), 10 deletions(-)
commit b6882ece49afb4c507d118af2db346fa329209dc
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 10:53:38 2011 -0400
make a copy of ServerMap.make_versionmap() (_make_versionmap2) for internal use
src/allmydata/mutable/servermap.py | 18 +++++++++++++-----
1 files changed, 13 insertions(+), 5 deletions(-)
commit 963f8e63faf32b950eb1b8103cd2ff16fe8f0151
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:45:58 2011 -0400
API of RetrieveStatus.add_problem()
src/allmydata/mutable/retrieve.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
commit 4976d29ffae565a048851601c29013bbae2976d8
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:45:05 2011 -0400
API of RetrieveStatus.add_fetch_timing()
src/allmydata/mutable/retrieve.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
commit d057d3bbba72663ee148a8b916bc2d52be2e3982
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:44:04 2011 -0400
API of Retrieve.notify_server_corruption()
src/allmydata/mutable/retrieve.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
commit 8a2a81e46671c860610e0e96d6add1a57551f22d
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:42:32 2011 -0400
remove unused _outstanding_queries
src/allmydata/mutable/retrieve.py | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
commit 56d12cc9968d03ccd53764455c671122c4f391d1
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:40:57 2011 -0400
change Retrieve.remaining_sharemap
src/allmydata/mutable/retrieve.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
commit 4f0b7af4821f43290bfc70f2b1fc30149ad81281
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 10:40:18 2011 -0400
accessor for PublishStatus._problems
src/allmydata/mutable/publish.py | 4 +++-
src/allmydata/web/status.py | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
commit 627087cf66d0b8cc519f4d551a967a7bd9b6a741
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 10:36:39 2011 -0400
accessor for RetrieveStatus._problems
src/allmydata/mutable/retrieve.py | 8 ++++++--
src/allmydata/web/status.py | 2 +-
2 files changed, 7 insertions(+), 3 deletions(-)
commit ca7dea81f03801b1c7353fc00ecba689268109cf
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:35:32 2011 -0400
add .server to "reader", so we can get at it later
src/allmydata/mutable/retrieve.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
commit 6ef516e24908ec195af084a7550d1921a5e983b0
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:32:32 2011 -0400
temporarily give Retrieve a _storage_broker, so it can map serverids to servers
src/allmydata/mutable/checker.py | 3 ++-
src/allmydata/mutable/filenode.py | 6 ++++--
src/allmydata/mutable/retrieve.py | 5 +++--
src/allmydata/test/test_mutable.py | 4 ++--
4 files changed, 11 insertions(+), 7 deletions(-)
commit afe08e4dd3f4ff9ff7e8a2a8d28b181e3625bcc9
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:21:51 2011 -0400
mutable/retrieve.py: s/peer/server/
src/allmydata/mutable/retrieve.py | 82 +++++++++++++-------------
src/allmydata/test/test_mutable.py | 6 +-
2 files changed, 44 insertions(+), 44 deletions(-)
commit 910afcb5d7f274880f68dd6cdb5b05f2bbc29adc
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:16:01 2011 -0400
web.status.PublishStatusPage: add comment, I think .problems isn't exercised
src/allmydata/web/status.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
commit 311466dd8c931bbba40d590ade867704282e7f1a
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:48:16 2011 -0400
API of PublishStatus.add_per_server_time()
src/allmydata/mutable/publish.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
commit 2df5faa1b6cbfbaded520d2320305a62fe961118
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:46:37 2011 -0400
more simplifications
src/allmydata/mutable/publish.py | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
commit 6ac4544a3da385f2aad9392f906b90192f4f919a
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:44:08 2011 -0400
API of ServerMap.version_on_server()
src/allmydata/mutable/publish.py | 2 +-
src/allmydata/mutable/servermap.py | 4 ++--
src/allmydata/test/test_mutable.py | 5 ++---
3 files changed, 5 insertions(+), 6 deletions(-)
commit 3e187e322511072e4683329df6b2c6c733a66dba
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:16:32 2011 -0400
API of ServerMap.make_sharemap()
src/allmydata/mutable/servermap.py | 4 ++--
src/allmydata/test/test_mutable.py | 7 ++++---
src/allmydata/web/status.py | 4 ++--
3 files changed, 8 insertions(+), 7 deletions(-)
commit 318feed8437bdd8d4943c6569d38f7b54b6313cc
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:36:19 2011 -0400
small cleanups
src/allmydata/mutable/publish.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
commit bd459ed5714e1db5a7163935c54b7b0b56db8349
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:33:39 2011 -0400
API of ServerMap.add_new_share()
src/allmydata/mutable/publish.py | 4 ++--
src/allmydata/mutable/servermap.py | 6 ++----
2 files changed, 4 insertions(+), 6 deletions(-)
commit f2804fb6ed11d80088e0da8ed48e6c2922f2ffef
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:30:26 2011 -0400
API of ServerMap.get_bad_shares()
src/allmydata/mutable/publish.py | 3 +--
src/allmydata/mutable/servermap.py | 9 ++++-----
2 files changed, 5 insertions(+), 7 deletions(-)
commit 965074a47b3ce1431cb46d9a233840afcf9105f5
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:26:58 2011 -0400
more small cleanups
src/allmydata/mutable/publish.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
commit 38020da34f034f8889947dd3dc05e087ffff7106
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:18:47 2011 -0400
change Publish.bad_share_checkstrings
src/allmydata/mutable/publish.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
commit 5efebcbd2ee0c2f299ea86f7591d856c0f265304
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:16:31 2011 -0400
change internals of Publish.update_goal()
src/allmydata/mutable/publish.py | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
commit e91b55ff4c2a69165b71f2c7b217ac319ff4c527
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:11:42 2011 -0400
get rid of Publish.connections
src/allmydata/mutable/publish.py | 27 +++++----------------------
1 files changed, 5 insertions(+), 22 deletions(-)
commit 64e9a53b3229ebe2f9ebf7ed502d539311d0e037
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:05:32 2011 -0400
change Publish.bad_servers
src/allmydata/mutable/publish.py | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
commit b85a934bef315a06bcfe00c9c12a3627fed2b918
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:03:07 2011 -0400
Publish.bad_servers: fix bug, this should be a set of serverids, not writers
src/allmydata/mutable/publish.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
commit 605ea15ec15ed671513819003ccd211cdb9761e0
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:00:21 2011 -0400
change .placed
src/allmydata/mutable/publish.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
commit f7aba37b1b345d5b6d5cb16e3b3f6f3c1afb658e
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 22:59:22 2011 -0400
temporarily stash IServer as .server on the "writer" object
src/allmydata/mutable/publish.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
commit f9b551d788e7db1f187fce5ab98ab5d5fe4e1c36
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 22:48:18 2011 -0400
change Publish.goal and API of log_goal() to use IServer, not serverid
src/allmydata/mutable/publish.py | 48 ++++++++++++++--------------
1 files changed, 24 insertions(+), 24 deletions(-)
commit 75f20616558e4900b8b1f685dd99aa838de6d452
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:27:02 2011 -0400
API of ServerMap.get_known_shares()
src/allmydata/mutable/publish.py | 16 ++++++++++------
src/allmydata/mutable/servermap.py | 7 ++-----
2 files changed, 12 insertions(+), 11 deletions(-)
commit 1c38c9d37bb08221b4418762234b1a62397b3b4b
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:20:29 2011 -0400
Publish.full_serverlist
src/allmydata/mutable/publish.py | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
commit b6cbd215a04b9cde31a7d92a97a7f048622b16f1
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:12:31 2011 -0400
API of ServerMap.all_servers()
src/allmydata/mutable/servermap.py | 19 ++++++-------------
1 files changed, 6 insertions(+), 13 deletions(-)
commit e63cd0315fae65357b1727ec6d5ff3c6e0d27c98
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:10:18 2011 -0400
remove ServerMap.connections, set_rref_for_serverid()
src/allmydata/mutable/servermap.py | 11 +----------
1 files changed, 1 insertions(+), 10 deletions(-)
commit 4df52db2f80eb12eefa5d57103c24893cde89553
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:04:06 2011 -0400
API of ServerMap.mark_server_reachable()
src/allmydata/mutable/servermap.py | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
commit 69c715bde77944dc25181b3dbbeb042c816f9a1b
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:03:21 2011 -0400
API of ServerMap.mark_server_unreachable()
src/allmydata/mutable/servermap.py | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
commit 3d784d60eec1c508858e3a617e4411ffbcc3c1fa
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:02:03 2011 -0400
API of status.set_privkey_from()
src/allmydata/mutable/servermap.py | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
commit 544ed3ea29bed7e66da7fd29ca3f6f076f27a9e6
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:01:15 2011 -0400
API of status.add_per_server_time()
src/allmydata/mutable/servermap.py | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
commit fffe5008b6320bd1e04c3c68389a2bf2ee383fa8
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:59:02 2011 -0400
remove unused .versionmap
src/allmydata/mutable/servermap.py | 7 -------
1 files changed, 0 insertions(+), 7 deletions(-)
commit 2816562e090d2294179db3588dafcca18de1bc2b
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:57:51 2011 -0400
remove serverid from all log messages. Also one unused lambda.
src/allmydata/mutable/servermap.py | 30 +++++++++++++-------------
1 files changed, 15 insertions(+), 15 deletions(-)
commit 28fa6b1a2738fa98c1f1dbd3d0e01ae98912d11f
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:54:30 2011 -0400
removed unused _readers
src/allmydata/mutable/servermap.py | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
commit a8e4ed3d645ab592d1add6a1e69b6d1ebfb77817
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:54:16 2011 -0400
remove unused _sharemap
src/allmydata/mutable/servermap.py | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
commit 3f072e55cf1d0700f9fffe23f8f3a475725df588
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:49:03 2011 -0400
_must_query
src/allmydata/mutable/servermap.py | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
commit c599a059b8df3f5785e4bf89fb6ecc6d8dcd708b
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:48:05 2011 -0400
_queries_outstanding
src/allmydata/mutable/servermap.py | 16 +++++++---------
1 files changed, 7 insertions(+), 9 deletions(-)
commit 7743759f98ac2c07926b2fdbd80bf52dfab33085
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:46:17 2011 -0400
_empty_servers
src/allmydata/mutable/servermap.py | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
commit 6bb1825916828a713a32cdf7f7411fa3ea2e1e5d
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:45:39 2011 -0400
_good_servers
src/allmydata/mutable/servermap.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
commit 1768fab1b51d8dd93ecabbaaabfadfa20cf6c3d4
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:44:59 2011 -0400
_bad_servers
src/allmydata/mutable/servermap.py | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
commit dccbaef30f0ba714c746bf6d4a1a803c36e17b65
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:41:54 2011 -0400
API of _try_to_set_pubkey()
src/allmydata/mutable/servermap.py | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
commit 0481ea70042ba3575f15eac7fd0780f8ece580cc
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:35:02 2011 -0400
API of notify_server_corruption()
src/allmydata/mutable/servermap.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
commit bea9cba18fb3b9c11bb22f18356a263ecec7351e
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:34:09 2011 -0400
API of _got_signature_one_share()
src/allmydata/mutable/servermap.py | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
commit 1520123583cf78650706e114b15bb5b0ac1f4a14
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:32:33 2011 -0400
API of _try_to_validate_privkey()
src/allmydata/mutable/servermap.py | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
commit 938852c9c8519c7a078f58a9b1f4dd8ec8b6715e
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:31:48 2011 -0400
API and internals of _add_lease_failed()
src/allmydata/mutable/servermap.py | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
commit 3843dba367e3c19e176a622ab853cb51d2472ddf
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:30:37 2011 -0400
API of _privkey_query_failed()
src/allmydata/mutable/servermap.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
commit 2219a710e1633cd57d0ca0786490de87b3e19ba7
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:29:43 2011 -0400
fix bug in call to _privkey_query_failed, unrelated to refactoring
src/allmydata/mutable/servermap.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
commit ae615bec7d0d1b269710b6902797b12f9592ad62
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:27:17 2011 -0400
API of _got_corrupt_share()
src/allmydata/mutable/servermap.py | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)
commit cb51c95a6f4e077278157a77dab060c8c1ad7a81
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:23:16 2011 -0400
API of _got_results()
src/allmydata/mutable/servermap.py | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
commit bac9154fe0af18f226999a58ffc2362d8cf4b802
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:19:19 2011 -0400
API of _query_failed()
src/allmydata/mutable/servermap.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
commit fdc29a8ca95d4b5c503e5382b9e5d4d02141ba12
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:17:20 2011 -0400
API of _do_read()
src/allmydata/mutable/servermap.py | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
commit e7e9e338f28d004aa4d423d11c65f1e271ac7322
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:20:21 2011 -0400
API of _do_query()
src/allmydata/mutable/servermap.py | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
commit 330625b9dac4cdbe72a11464a893065b9aeed453
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:43:05 2011 -0400
next step: first batch of updates to ServermapUpdater
updates:
most method-local variables in update()
API of _build_initial_querylist()
API of _send_initial_requests()
.full_serverlist
.extra_servers
src/allmydata/mutable/servermap.py | 39 ++++++++++++++------------
1 files changed, 21 insertions(+), 18 deletions(-)
commit 4aadc584fa7dcb2daa86b048c81dee0049ba26d9
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:07:00 2011 -0400
internal change: index _bad_shares with IServer
src/allmydata/mutable/servermap.py | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
commit 16d4e6fa82a9907dbdc92094213387c6a4164e41
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:20:47 2011 +0100
internal change: index _known_shares with IServer instead of serverid
callers are unchanged
src/allmydata/mutable/servermap.py | 42 +++++++++++++++----------
1 files changed, 25 insertions(+), 17 deletions(-)
commit ceeb5f4938cc814a0c75d1b8f4018aed965c2176
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:11:43 2011 +0100
accessors and name cleanup for servermap.Servermap.last_update_mode/time
src/allmydata/mutable/filenode.py | 6 +++---
src/allmydata/mutable/publish.py | 4 ++--
src/allmydata/mutable/servermap.py | 17 +++++++++++------
3 files changed, 16 insertions(+), 11 deletions(-)
commit 8d3cbda82661c0a7e5c3d3b65cf7a5d5ab7e32c0
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:11:14 2011 +0100
accessors and name cleanup for servermap.Servermap.problems
src/allmydata/mutable/servermap.py | 21 +++++++++++++--------
src/allmydata/test/test_mutable.py | 6 +++---
2 files changed, 16 insertions(+), 11 deletions(-)
commit 348f57988f79389db0aab7672e6eaa9a6d8e3219
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:10:41 2011 +0100
accessors and name cleanup for servermap.Servermap.bad_shares
src/allmydata/mutable/publish.py | 2 +-
src/allmydata/mutable/servermap.py | 30 ++++++++++++++-----------
2 files changed, 18 insertions(+), 14 deletions(-)
commit 520c9368134673cdf76c653c5e1bb91c2ab5d51e
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:10:05 2011 +0100
accessors and name cleanup for servermap.Servermap.servermap .
src/allmydata/mutable/publish.py | 14 +++++----
src/allmydata/mutable/servermap.py | 38 ++++++++++++++-----------
2 files changed, 29 insertions(+), 23 deletions(-)
commit b8b8dc38287a91dbdf494426ac801d9381ce5841
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:08:02 2011 +0100
fix reachable_servers
src/allmydata/mutable/checker.py | 3 ++-
src/allmydata/mutable/publish.py | 4 +++-
src/allmydata/mutable/servermap.py | 12 ++++++++++--
3 files changed, 15 insertions(+), 4 deletions(-)
commit cb0cfd1adfefad357c187aaaf690c3df68b622bc
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:06:03 2011 +0100
fix Servermap.unreachable_servers
src/allmydata/mutable/servermap.py | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
commit 2d9ea79b94bd4db674d40386fda90825785ac495
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:03:48 2011 +0100
give ServerMap a StorageFarmBroker, temporary
this makes it possible for the ServerMap to accept bare serverids and still
build data structures with IServers
src/allmydata/mutable/checker.py | 2 +-
src/allmydata/mutable/filenode.py | 2 +-
src/allmydata/mutable/publish.py | 2 +-
src/allmydata/mutable/servermap.py | 5 +++--
src/allmydata/test/test_mutable.py | 8 ++++----
5 files changed, 10 insertions(+), 9 deletions(-)
commit 718d1aeff6fded893f65397806d22ece928b0dd4
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 13:43:30 2011 -0400
add StorageFarmBroker.get_server_for_id(), temporary helper
This will go away once we're passing IServers everywhere.
src/allmydata/storage_client.py | 2 ++
src/allmydata/test/no_network.py | 13 +++++++++++++
2 files changed, 15 insertions(+), 0 deletions(-)
commit ece20231d7fda0d503704842a4aa068dfbc2e54e
Author: Brian Warner <warner@lothar.com>
Date: Sun Oct 2 01:11:50 2011 +0100
add proper accessors for Servermap.connections, to make refactoring easier
src/allmydata/mutable/publish.py | 6 +++---
src/allmydata/mutable/retrieve.py | 10 +++++-----
src/allmydata/mutable/servermap.py | 17 +++++++++++------
3 files changed, 19 insertions(+), 14 deletions(-)
commit 3b943d6bf302ff702668081a612fc4fe2604cf9c
Author: Brian Warner <warner@lothar.com>
Date: Fri Sep 23 10:34:30 2011 -0700
mutable/servermap.py and neighbors: s/peer/server/
src/allmydata/mutable/checker.py | 22 +-
src/allmydata/mutable/publish.py | 204 +++++++-------
src/allmydata/mutable/servermap.py | 402 +++++++++++++-------------
src/allmydata/test/test_mutable.py | 18 +-
4 files changed, 323 insertions(+), 323 deletions(-)
IServer refactoring: pass IServer instances around, instead of peerids
refs #1363
This collapses 88 small incremental changes (each of which passes all tests)
into one big patch. The development process for the long path started with
adding some temporary scaffolding, changing one method at a time, then
removing the scaffolding. The individual pieces are as follows, in reverse
chronological order (the first patch is at the end of this comment):
commit 9bbe4174fd0d98a6cf47a8ef96e85d9ef34b2f9a
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 16:05:00 2011 -0400
immutable/downloader/status.py: correct comment
src/allmydata/immutable/downloader/status.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
commit 72146a7c7c91eac2f7c3ceb801eb7a1721376889
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 15:46:20 2011 -0400
remove temporary ServerMap._storage_broker
src/allmydata/mutable/checker.py | 2 +-
src/allmydata/mutable/filenode.py | 2 +-
src/allmydata/mutable/publish.py | 2 +-
src/allmydata/mutable/servermap.py | 5 ++---
src/allmydata/test/test_mutable.py | 8 ++++----
5 files changed, 9 insertions(+), 10 deletions(-)
commit d703096b41632c47d76414b12672e076a422ff5c
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 15:37:05 2011 -0400
remove temporary storage_broker.get_server_for_id()
src/allmydata/storage_client.py | 3 ---
src/allmydata/test/no_network.py | 13 -------------
2 files changed, 0 insertions(+), 16 deletions(-)
commit 620cc5d80882ef6f7decfd26af8a6c7c1ddf80d1
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 12:50:06 2011 -0400
API of Retrieve._try_to_validate_privkey(), trying to remove reader.server
src/allmydata/mutable/retrieve.py | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
commit 92f43f856f4a8b36c207d1b190ed8699b5a4ecb4
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 12:48:08 2011 -0400
API of Retrieve._validate_block(), trying to remove reader.server
src/allmydata/mutable/retrieve.py | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
commit 572d5070761861a2190349d1ed8d85dbc25698a5
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 12:36:58 2011 -0400
API of Retrieve._mark_bad_share(), trying to remove reader.server
src/allmydata/mutable/retrieve.py | 21 +++++++++------------
1 files changed, 9 insertions(+), 12 deletions(-)
commit a793ff00c0de1e2eec7b46288fdf388c7a2bec89
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 12:06:13 2011 -0400
remove now-unused get_rref_for_serverid()
src/allmydata/mutable/servermap.py | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
commit 1b9827cc9366bf90b93297fdd6832f2ad0480ce7
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 12:03:09 2011 -0400
Retrieve: stop adding .serverid attributes to readers
src/allmydata/mutable/retrieve.py | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
commit 5d4e9d491b19e49d2e443a1dfff2c672842c36ef
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 12:03:34 2011 -0400
return value of Retrieve(verify=True)
src/allmydata/mutable/checker.py | 11 ++++++-----
src/allmydata/mutable/retrieve.py | 3 +--
2 files changed, 7 insertions(+), 7 deletions(-)
commit e9ab7978c384e1f677cb7779dc449b1044face82
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:54:23 2011 -0400
Retrieve._bad_shares (but not return value, used by Verifier)
src/allmydata/mutable/retrieve.py | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
commit 2d91926de233ec5c881f30e36b4a30ad92ab42a9
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:51:23 2011 -0400
Publish: stop adding .serverid attributes to writers
src/allmydata/mutable/publish.py | 9 ++-------
1 files changed, 2 insertions(+), 7 deletions(-)
commit 47c7a0105dec7cbf4f7e0a3ce800bbb85b15df4a
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:56:33 2011 -0400
API of get_write_enabler()
src/allmydata/mutable/filenode.py | 7 ++++---
src/allmydata/mutable/publish.py | 4 ++--
src/allmydata/test/no_network.py | 3 +++
3 files changed, 9 insertions(+), 5 deletions(-)
commit 9196a5c6590fdbfd660325ea8358b345887d3db0
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:46:24 2011 -0400
API of get_(renewal|cancel)_secret()
src/allmydata/mutable/filenode.py | 14 ++++++++------
src/allmydata/mutable/publish.py | 8 ++++----
src/allmydata/mutable/servermap.py | 5 ++---
3 files changed, 14 insertions(+), 13 deletions(-)
commit de7c1552f8c163eff5b6d820b5fb3b21c1b47cb5
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:41:52 2011 -0400
API of CorruptShareError. Also comment out some related+unused test_web.py code
src/allmydata/mutable/common.py | 13 +++++--------
src/allmydata/mutable/retrieve.py | 10 +++++-----
src/allmydata/mutable/servermap.py | 8 +++-----
src/allmydata/test/common.py | 13 ++++++++-----
4 files changed, 21 insertions(+), 23 deletions(-)
commit 2c1c314046b620c16f1e66d030c150d768b7d01e
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 12:01:46 2011 -0400
API of ServerMap.mark_bad_share()
src/allmydata/mutable/publish.py | 2 +-
src/allmydata/mutable/retrieve.py | 6 +++---
src/allmydata/mutable/servermap.py | 6 ++----
src/allmydata/test/test_mutable.py | 3 +--
4 files changed, 7 insertions(+), 10 deletions(-)
commit 1bed349030779fd0c378ae4e821384f953c6f6ff
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:11:17 2011 -0400
API+name of ServerMap.shares_on_server() : only for tests, so debug_ prefix
src/allmydata/mutable/servermap.py | 7 ++-----
src/allmydata/test/test_mutable.py | 6 +++---
2 files changed, 5 insertions(+), 8 deletions(-)
commit 2d32e448677d6b818692e801045d4115b29abf21
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:07:10 2011 -0400
API of ServerMap.all_servers_for_version()
src/allmydata/mutable/servermap.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
commit 48f3204d1889c3e7179578125c4bdef515af3d6a
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:04:50 2011 -0400
internals of ServerMap methods that use make_versionmap(), remove temp copy
src/allmydata/mutable/servermap.py | 28 +++++++++----------------
1 files changed, 10 insertions(+), 18 deletions(-)
commit 5c3da77b6c777a145bd5ddfaa4db849dc9495548
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 11:01:28 2011 -0400
API of ServerMap.make_versionmap()
src/allmydata/mutable/checker.py | 4 ++--
src/allmydata/mutable/retrieve.py | 5 ++---
src/allmydata/mutable/servermap.py | 4 ++--
src/allmydata/test/test_mutable.py | 7 ++++---
4 files changed, 10 insertions(+), 10 deletions(-)
commit b6882ece49afb4c507d118af2db346fa329209dc
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 10:53:38 2011 -0400
make a copy of ServerMap.make_versionmap() (_make_versionmap2) for internal use
src/allmydata/mutable/servermap.py | 18 +++++++++++++-----
1 files changed, 13 insertions(+), 5 deletions(-)
commit 963f8e63faf32b950eb1b8103cd2ff16fe8f0151
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:45:58 2011 -0400
API of RetrieveStatus.add_problem()
src/allmydata/mutable/retrieve.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
commit 4976d29ffae565a048851601c29013bbae2976d8
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:45:05 2011 -0400
API of RetrieveStatus.add_fetch_timing()
src/allmydata/mutable/retrieve.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
commit d057d3bbba72663ee148a8b916bc2d52be2e3982
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:44:04 2011 -0400
API of Retrieve.notify_server_corruption()
src/allmydata/mutable/retrieve.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
commit 8a2a81e46671c860610e0e96d6add1a57551f22d
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:42:32 2011 -0400
remove unused _outstanding_queries
src/allmydata/mutable/retrieve.py | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
commit 56d12cc9968d03ccd53764455c671122c4f391d1
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:40:57 2011 -0400
change Retrieve.remaining_sharemap
src/allmydata/mutable/retrieve.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
commit 4f0b7af4821f43290bfc70f2b1fc30149ad81281
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 10:40:18 2011 -0400
accessor for PublishStatus._problems
src/allmydata/mutable/publish.py | 4 +++-
src/allmydata/web/status.py | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
commit 627087cf66d0b8cc519f4d551a967a7bd9b6a741
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 10:36:39 2011 -0400
accessor for RetrieveStatus._problems
src/allmydata/mutable/retrieve.py | 8 ++++++--
src/allmydata/web/status.py | 2 +-
2 files changed, 7 insertions(+), 3 deletions(-)
commit ca7dea81f03801b1c7353fc00ecba689268109cf
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:35:32 2011 -0400
add .server to "reader", so we can get at it later
src/allmydata/mutable/retrieve.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
commit 6ef516e24908ec195af084a7550d1921a5e983b0
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:32:32 2011 -0400
temporarily give Retrieve a _storage_broker, so it can map serverids to servers
src/allmydata/mutable/checker.py | 3 ++-
src/allmydata/mutable/filenode.py | 6 ++++--
src/allmydata/mutable/retrieve.py | 5 +++--
src/allmydata/test/test_mutable.py | 4 ++--
4 files changed, 11 insertions(+), 7 deletions(-)
commit afe08e4dd3f4ff9ff7e8a2a8d28b181e3625bcc9
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:21:51 2011 -0400
mutable/retrieve.py: s/peer/server/
src/allmydata/mutable/retrieve.py | 82 +++++++++++++-------------
src/allmydata/test/test_mutable.py | 6 +-
2 files changed, 44 insertions(+), 44 deletions(-)
commit 910afcb5d7f274880f68dd6cdb5b05f2bbc29adc
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:16:01 2011 -0400
web.status.PublishStatusPage: add comment, I think .problems isn't exercised
src/allmydata/web/status.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
commit 311466dd8c931bbba40d590ade867704282e7f1a
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:48:16 2011 -0400
API of PublishStatus.add_per_server_time()
src/allmydata/mutable/publish.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
commit 2df5faa1b6cbfbaded520d2320305a62fe961118
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:46:37 2011 -0400
more simplifications
src/allmydata/mutable/publish.py | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
commit 6ac4544a3da385f2aad9392f906b90192f4f919a
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:44:08 2011 -0400
API of ServerMap.version_on_server()
src/allmydata/mutable/publish.py | 2 +-
src/allmydata/mutable/servermap.py | 4 ++--
src/allmydata/test/test_mutable.py | 5 ++---
3 files changed, 5 insertions(+), 6 deletions(-)
commit 3e187e322511072e4683329df6b2c6c733a66dba
Author: Brian Warner <warner@lothar.com>
Date: Tue Oct 4 00:16:32 2011 -0400
API of ServerMap.make_sharemap()
src/allmydata/mutable/servermap.py | 4 ++--
src/allmydata/test/test_mutable.py | 7 ++++---
src/allmydata/web/status.py | 4 ++--
3 files changed, 8 insertions(+), 7 deletions(-)
commit 318feed8437bdd8d4943c6569d38f7b54b6313cc
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:36:19 2011 -0400
small cleanups
src/allmydata/mutable/publish.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
commit bd459ed5714e1db5a7163935c54b7b0b56db8349
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:33:39 2011 -0400
API of ServerMap.add_new_share()
src/allmydata/mutable/publish.py | 4 ++--
src/allmydata/mutable/servermap.py | 6 ++----
2 files changed, 4 insertions(+), 6 deletions(-)
commit f2804fb6ed11d80088e0da8ed48e6c2922f2ffef
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:30:26 2011 -0400
API of ServerMap.get_bad_shares()
src/allmydata/mutable/publish.py | 3 +--
src/allmydata/mutable/servermap.py | 9 ++++-----
2 files changed, 5 insertions(+), 7 deletions(-)
commit 965074a47b3ce1431cb46d9a233840afcf9105f5
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:26:58 2011 -0400
more small cleanups
src/allmydata/mutable/publish.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
commit 38020da34f034f8889947dd3dc05e087ffff7106
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:18:47 2011 -0400
change Publish.bad_share_checkstrings
src/allmydata/mutable/publish.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
commit 5efebcbd2ee0c2f299ea86f7591d856c0f265304
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:16:31 2011 -0400
change internals of Publish.update_goal()
src/allmydata/mutable/publish.py | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
commit e91b55ff4c2a69165b71f2c7b217ac319ff4c527
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:11:42 2011 -0400
get rid of Publish.connections
src/allmydata/mutable/publish.py | 27 +++++----------------------
1 files changed, 5 insertions(+), 22 deletions(-)
commit 64e9a53b3229ebe2f9ebf7ed502d539311d0e037
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:05:32 2011 -0400
change Publish.bad_servers
src/allmydata/mutable/publish.py | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
commit b85a934bef315a06bcfe00c9c12a3627fed2b918
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:03:07 2011 -0400
Publish.bad_servers: fix bug, this should be a set of serverids, not writers
src/allmydata/mutable/publish.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
commit 605ea15ec15ed671513819003ccd211cdb9761e0
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 23:00:21 2011 -0400
change .placed
src/allmydata/mutable/publish.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
commit f7aba37b1b345d5b6d5cb16e3b3f6f3c1afb658e
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 22:59:22 2011 -0400
temporarily stash IServer as .server on the "writer" object
src/allmydata/mutable/publish.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
commit f9b551d788e7db1f187fce5ab98ab5d5fe4e1c36
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 22:48:18 2011 -0400
change Publish.goal and API of log_goal() to use IServer, not serverid
src/allmydata/mutable/publish.py | 48 ++++++++++++++--------------
1 files changed, 24 insertions(+), 24 deletions(-)
commit 75f20616558e4900b8b1f685dd99aa838de6d452
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:27:02 2011 -0400
API of ServerMap.get_known_shares()
src/allmydata/mutable/publish.py | 16 ++++++++++------
src/allmydata/mutable/servermap.py | 7 ++-----
2 files changed, 12 insertions(+), 11 deletions(-)
commit 1c38c9d37bb08221b4418762234b1a62397b3b4b
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:20:29 2011 -0400
Publish.full_serverlist
src/allmydata/mutable/publish.py | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
commit b6cbd215a04b9cde31a7d92a97a7f048622b16f1
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:12:31 2011 -0400
API of ServerMap.all_servers()
src/allmydata/mutable/servermap.py | 19 ++++++-------------
1 files changed, 6 insertions(+), 13 deletions(-)
commit e63cd0315fae65357b1727ec6d5ff3c6e0d27c98
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:10:18 2011 -0400
remove ServerMap.connections, set_rref_for_serverid()
src/allmydata/mutable/servermap.py | 11 +----------
1 files changed, 1 insertions(+), 10 deletions(-)
commit 4df52db2f80eb12eefa5d57103c24893cde89553
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:04:06 2011 -0400
API of ServerMap.mark_server_reachable()
src/allmydata/mutable/servermap.py | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
commit 69c715bde77944dc25181b3dbbeb042c816f9a1b
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:03:21 2011 -0400
API of ServerMap.mark_server_unreachable()
src/allmydata/mutable/servermap.py | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
commit 3d784d60eec1c508858e3a617e4411ffbcc3c1fa
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:02:03 2011 -0400
API of status.set_privkey_from()
src/allmydata/mutable/servermap.py | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
commit 544ed3ea29bed7e66da7fd29ca3f6f076f27a9e6
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:01:15 2011 -0400
API of status.add_per_server_time()
src/allmydata/mutable/servermap.py | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
commit fffe5008b6320bd1e04c3c68389a2bf2ee383fa8
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:59:02 2011 -0400
remove unused .versionmap
src/allmydata/mutable/servermap.py | 7 -------
1 files changed, 0 insertions(+), 7 deletions(-)
commit 2816562e090d2294179db3588dafcca18de1bc2b
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:57:51 2011 -0400
remove serverid from all log messages. Also one unused lambda.
src/allmydata/mutable/servermap.py | 30 +++++++++++++-------------
1 files changed, 15 insertions(+), 15 deletions(-)
commit 28fa6b1a2738fa98c1f1dbd3d0e01ae98912d11f
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:54:30 2011 -0400
removed unused _readers
src/allmydata/mutable/servermap.py | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
commit a8e4ed3d645ab592d1add6a1e69b6d1ebfb77817
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:54:16 2011 -0400
remove unused _sharemap
src/allmydata/mutable/servermap.py | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
commit 3f072e55cf1d0700f9fffe23f8f3a475725df588
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:49:03 2011 -0400
_must_query
src/allmydata/mutable/servermap.py | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
commit c599a059b8df3f5785e4bf89fb6ecc6d8dcd708b
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:48:05 2011 -0400
_queries_outstanding
src/allmydata/mutable/servermap.py | 16 +++++++---------
1 files changed, 7 insertions(+), 9 deletions(-)
commit 7743759f98ac2c07926b2fdbd80bf52dfab33085
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:46:17 2011 -0400
_empty_servers
src/allmydata/mutable/servermap.py | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
commit 6bb1825916828a713a32cdf7f7411fa3ea2e1e5d
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:45:39 2011 -0400
_good_servers
src/allmydata/mutable/servermap.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
commit 1768fab1b51d8dd93ecabbaaabfadfa20cf6c3d4
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:44:59 2011 -0400
_bad_servers
src/allmydata/mutable/servermap.py | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
commit dccbaef30f0ba714c746bf6d4a1a803c36e17b65
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:41:54 2011 -0400
API of _try_to_set_pubkey()
src/allmydata/mutable/servermap.py | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
commit 0481ea70042ba3575f15eac7fd0780f8ece580cc
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:35:02 2011 -0400
API of notify_server_corruption()
src/allmydata/mutable/servermap.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
commit bea9cba18fb3b9c11bb22f18356a263ecec7351e
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:34:09 2011 -0400
API of _got_signature_one_share()
src/allmydata/mutable/servermap.py | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
commit 1520123583cf78650706e114b15bb5b0ac1f4a14
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:32:33 2011 -0400
API of _try_to_validate_privkey()
src/allmydata/mutable/servermap.py | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
commit 938852c9c8519c7a078f58a9b1f4dd8ec8b6715e
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:31:48 2011 -0400
API and internals of _add_lease_failed()
src/allmydata/mutable/servermap.py | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
commit 3843dba367e3c19e176a622ab853cb51d2472ddf
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:30:37 2011 -0400
API of _privkey_query_failed()
src/allmydata/mutable/servermap.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
commit 2219a710e1633cd57d0ca0786490de87b3e19ba7
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:29:43 2011 -0400
fix bug in call to _privkey_query_failed, unrelated to refactoring
src/allmydata/mutable/servermap.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
commit ae615bec7d0d1b269710b6902797b12f9592ad62
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:27:17 2011 -0400
API of _got_corrupt_share()
src/allmydata/mutable/servermap.py | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)
commit cb51c95a6f4e077278157a77dab060c8c1ad7a81
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:23:16 2011 -0400
API of _got_results()
src/allmydata/mutable/servermap.py | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
commit bac9154fe0af18f226999a58ffc2362d8cf4b802
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:19:19 2011 -0400
API of _query_failed()
src/allmydata/mutable/servermap.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
commit fdc29a8ca95d4b5c503e5382b9e5d4d02141ba12
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:17:20 2011 -0400
API of _do_read()
src/allmydata/mutable/servermap.py | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
commit e7e9e338f28d004aa4d423d11c65f1e271ac7322
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:20:21 2011 -0400
API of _do_query()
src/allmydata/mutable/servermap.py | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
commit 330625b9dac4cdbe72a11464a893065b9aeed453
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 14:43:05 2011 -0400
next step: first batch of updates to ServermapUpdater
updates:
most method-local variables in update()
API of _build_initial_querylist()
API of _send_initial_requests()
.full_serverlist
.extra_servers
src/allmydata/mutable/servermap.py | 39 ++++++++++++++------------
1 files changed, 21 insertions(+), 18 deletions(-)
commit 4aadc584fa7dcb2daa86b048c81dee0049ba26d9
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 15:07:00 2011 -0400
internal change: index _bad_shares with IServer
src/allmydata/mutable/servermap.py | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
commit 16d4e6fa82a9907dbdc92094213387c6a4164e41
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:20:47 2011 +0100
internal change: index _known_shares with IServer instead of serverid
callers are unchanged
src/allmydata/mutable/servermap.py | 42 +++++++++++++++----------
1 files changed, 25 insertions(+), 17 deletions(-)
commit ceeb5f4938cc814a0c75d1b8f4018aed965c2176
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:11:43 2011 +0100
accessors and name cleanup for servermap.Servermap.last_update_mode/time
src/allmydata/mutable/filenode.py | 6 +++---
src/allmydata/mutable/publish.py | 4 ++--
src/allmydata/mutable/servermap.py | 17 +++++++++++------
3 files changed, 16 insertions(+), 11 deletions(-)
commit 8d3cbda82661c0a7e5c3d3b65cf7a5d5ab7e32c0
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:11:14 2011 +0100
accessors and name cleanup for servermap.Servermap.problems
src/allmydata/mutable/servermap.py | 21 +++++++++++++--------
src/allmydata/test/test_mutable.py | 6 +++---
2 files changed, 16 insertions(+), 11 deletions(-)
commit 348f57988f79389db0aab7672e6eaa9a6d8e3219
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:10:41 2011 +0100
accessors and name cleanup for servermap.Servermap.bad_shares
src/allmydata/mutable/publish.py | 2 +-
src/allmydata/mutable/servermap.py | 30 ++++++++++++++-----------
2 files changed, 18 insertions(+), 14 deletions(-)
commit 520c9368134673cdf76c653c5e1bb91c2ab5d51e
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:10:05 2011 +0100
accessors and name cleanup for servermap.Servermap.servermap .
src/allmydata/mutable/publish.py | 14 +++++----
src/allmydata/mutable/servermap.py | 38 ++++++++++++++-----------
2 files changed, 29 insertions(+), 23 deletions(-)
commit b8b8dc38287a91dbdf494426ac801d9381ce5841
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:08:02 2011 +0100
fix reachable_servers
src/allmydata/mutable/checker.py | 3 ++-
src/allmydata/mutable/publish.py | 4 +++-
src/allmydata/mutable/servermap.py | 12 ++++++++++--
3 files changed, 15 insertions(+), 4 deletions(-)
commit cb0cfd1adfefad357c187aaaf690c3df68b622bc
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:06:03 2011 +0100
fix Servermap.unreachable_servers
src/allmydata/mutable/servermap.py | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
commit 2d9ea79b94bd4db674d40386fda90825785ac495
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 18:03:48 2011 +0100
give ServerMap a StorageFarmBroker, temporary
this makes it possible for the ServerMap to accept bare serverids and still
build data structures with IServers
src/allmydata/mutable/checker.py | 2 +-
src/allmydata/mutable/filenode.py | 2 +-
src/allmydata/mutable/publish.py | 2 +-
src/allmydata/mutable/servermap.py | 5 +++--
src/allmydata/test/test_mutable.py | 8 ++++----
5 files changed, 10 insertions(+), 9 deletions(-)
commit 718d1aeff6fded893f65397806d22ece928b0dd4
Author: Brian Warner <warner@lothar.com>
Date: Mon Oct 3 13:43:30 2011 -0400
add StorageFarmBroker.get_server_for_id(), temporary helper
This will go away once we're passing IServers everywhere.
src/allmydata/storage_client.py | 2 ++
src/allmydata/test/no_network.py | 13 +++++++++++++
2 files changed, 15 insertions(+), 0 deletions(-)
commit ece20231d7fda0d503704842a4aa068dfbc2e54e
Author: Brian Warner <warner@lothar.com>
Date: Sun Oct 2 01:11:50 2011 +0100
add proper accessors for Servermap.connections, to make refactoring easier
src/allmydata/mutable/publish.py | 6 +++---
src/allmydata/mutable/retrieve.py | 10 +++++-----
src/allmydata/mutable/servermap.py | 17 +++++++++++------
3 files changed, 19 insertions(+), 14 deletions(-)
commit 3b943d6bf302ff702668081a612fc4fe2604cf9c
Author: Brian Warner <warner@lothar.com>
Date: Fri Sep 23 10:34:30 2011 -0700
mutable/servermap.py and neighbors: s/peer/server/
src/allmydata/mutable/checker.py | 22 +-
src/allmydata/mutable/publish.py | 204 +++++++-------
src/allmydata/mutable/servermap.py | 402 +++++++++++++-------------
src/allmydata/test/test_mutable.py | 18 +-
4 files changed, 323 insertions(+), 323 deletions(-)
2011-11-01 04:03:19 +00:00
|
|
|
# XXX: is this exercised? I don't think PublishStatus.problems is
|
|
|
|
# ever populated
|
2008-03-06 01:41:10 +00:00
|
|
|
for peerid in sorted(problems.keys()):
|
|
|
|
peerid_s = idlib.shortnodeid_b2a(peerid)
|
|
|
|
l[T.li["[%s]: %s" % (peerid_s, problems[peerid])]]
|
|
|
|
return ctx.tag["Server Problems:", l]
|
|
|
|
|
|
|
|
def _get_rate(self, data, name):
|
|
|
|
file_size = self.publish_status.get_size()
|
|
|
|
time = self.publish_status.timings.get(name)
|
2010-08-15 14:19:33 +00:00
|
|
|
return compute_rate(file_size, time)
|
2008-03-06 01:41:10 +00:00
|
|
|
|
|
|
|
def data_time_total(self, ctx, data):
|
|
|
|
return self.publish_status.timings.get("total")
|
|
|
|
def data_rate_total(self, ctx, data):
|
|
|
|
return self._get_rate(data, "total")
|
|
|
|
|
|
|
|
def data_time_setup(self, ctx, data):
|
|
|
|
return self.publish_status.timings.get("setup")
|
|
|
|
|
|
|
|
def data_time_encrypt(self, ctx, data):
|
|
|
|
return self.publish_status.timings.get("encrypt")
|
|
|
|
def data_rate_encrypt(self, ctx, data):
|
|
|
|
return self._get_rate(data, "encrypt")
|
|
|
|
|
|
|
|
def data_time_encode(self, ctx, data):
|
|
|
|
return self.publish_status.timings.get("encode")
|
|
|
|
def data_rate_encode(self, ctx, data):
|
|
|
|
return self._get_rate(data, "encode")
|
|
|
|
|
|
|
|
def data_time_pack(self, ctx, data):
|
|
|
|
return self.publish_status.timings.get("pack")
|
|
|
|
def data_rate_pack(self, ctx, data):
|
|
|
|
return self._get_rate(data, "pack")
|
|
|
|
def data_time_sign(self, ctx, data):
|
|
|
|
return self.publish_status.timings.get("sign")
|
|
|
|
|
|
|
|
def data_time_push(self, ctx, data):
|
|
|
|
return self.publish_status.timings.get("push")
|
|
|
|
def data_rate_push(self, ctx, data):
|
|
|
|
return self._get_rate(data, "push")
|
|
|
|
|
|
|
|
def render_server_timings(self, ctx, data):
|
2008-04-17 00:49:06 +00:00
|
|
|
per_server = self.publish_status.timings.get("send_per_server")
|
2008-03-06 01:41:10 +00:00
|
|
|
if not per_server:
|
|
|
|
return ""
|
|
|
|
l = T.ul()
|
2012-03-17 23:52:32 +00:00
|
|
|
for server in sorted(per_server.keys(), key=lambda s: s.get_name()):
|
2008-04-17 00:49:06 +00:00
|
|
|
times_s = ", ".join([self.render_time(None, t)
|
2012-03-17 23:52:32 +00:00
|
|
|
for t in per_server[server]])
|
|
|
|
l[T.li["[%s]: %s" % (server.get_name(), times_s)]]
|
2008-03-06 01:41:10 +00:00
|
|
|
return T.li["Per-Server Response Times: ", l]
|
|
|
|
|
2008-04-17 02:05:41 +00:00
|
|
|
class MapupdateStatusPage(rend.Page, RateAndTimeMixin):
|
|
|
|
docFactory = getxmlfile("map-update-status.xhtml")
|
|
|
|
|
|
|
|
def __init__(self, data):
|
|
|
|
rend.Page.__init__(self, data)
|
|
|
|
self.update_status = data
|
|
|
|
|
|
|
|
def render_started(self, ctx, data):
|
|
|
|
TIME_FORMAT = "%H:%M:%S %d-%b-%Y"
|
|
|
|
started_s = time.strftime(TIME_FORMAT,
|
|
|
|
time.localtime(data.get_started()))
|
|
|
|
return started_s
|
|
|
|
|
2008-04-19 02:55:12 +00:00
|
|
|
def render_finished(self, ctx, data):
|
|
|
|
when = data.get_finished()
|
|
|
|
if not when:
|
|
|
|
return "not yet"
|
|
|
|
TIME_FORMAT = "%H:%M:%S %d-%b-%Y"
|
|
|
|
started_s = time.strftime(TIME_FORMAT,
|
|
|
|
time.localtime(data.get_finished()))
|
|
|
|
return started_s
|
|
|
|
|
2008-04-17 02:05:41 +00:00
|
|
|
def render_si(self, ctx, data):
|
|
|
|
si_s = base32.b2a_or_none(data.get_storage_index())
|
|
|
|
if si_s is None:
|
|
|
|
si_s = "(None)"
|
|
|
|
return si_s
|
|
|
|
|
|
|
|
def render_helper(self, ctx, data):
|
|
|
|
return {True: "Yes",
|
|
|
|
False: "No"}[data.using_helper()]
|
|
|
|
|
|
|
|
def render_progress(self, ctx, data):
|
|
|
|
progress = data.get_progress()
|
|
|
|
# TODO: make an ascii-art bar
|
|
|
|
return "%.1f%%" % (100.0 * progress)
|
|
|
|
|
|
|
|
def render_status(self, ctx, data):
|
|
|
|
return data.get_status()
|
|
|
|
|
|
|
|
def render_problems(self, ctx, data):
|
|
|
|
problems = data.problems
|
|
|
|
if not problems:
|
|
|
|
return ""
|
|
|
|
l = T.ul()
|
|
|
|
for peerid in sorted(problems.keys()):
|
|
|
|
peerid_s = idlib.shortnodeid_b2a(peerid)
|
|
|
|
l[T.li["[%s]: %s" % (peerid_s, problems[peerid])]]
|
|
|
|
return ctx.tag["Server Problems:", l]
|
|
|
|
|
|
|
|
def render_privkey_from(self, ctx, data):
|
2012-03-17 23:52:32 +00:00
|
|
|
server = data.get_privkey_from()
|
|
|
|
if server:
|
|
|
|
return ctx.tag["Got privkey from: [%s]" % server.get_name()]
|
2008-04-17 02:05:41 +00:00
|
|
|
else:
|
|
|
|
return ""
|
|
|
|
|
|
|
|
def data_time_total(self, ctx, data):
|
|
|
|
return self.update_status.timings.get("total")
|
|
|
|
|
2008-04-21 23:16:55 +00:00
|
|
|
def data_time_initial_queries(self, ctx, data):
|
|
|
|
return self.update_status.timings.get("initial_queries")
|
2008-04-17 02:05:41 +00:00
|
|
|
|
|
|
|
def data_time_cumulative_verify(self, ctx, data):
|
|
|
|
return self.update_status.timings.get("cumulative_verify")
|
|
|
|
|
|
|
|
def render_server_timings(self, ctx, data):
|
|
|
|
per_server = self.update_status.timings.get("per_server")
|
|
|
|
if not per_server:
|
|
|
|
return ""
|
|
|
|
l = T.ul()
|
2012-03-17 23:52:32 +00:00
|
|
|
for server in sorted(per_server.keys(), key=lambda s: s.get_name()):
|
2008-04-17 02:05:41 +00:00
|
|
|
times = []
|
2012-03-17 23:52:32 +00:00
|
|
|
for op,started,t in per_server[server]:
|
2008-04-21 23:16:55 +00:00
|
|
|
#times.append("%s/%.4fs/%s/%s" % (op,
|
|
|
|
# started,
|
|
|
|
# self.render_time(None, started - self.update_status.get_started()),
|
|
|
|
# self.render_time(None,t)))
|
2008-04-17 02:05:41 +00:00
|
|
|
if op == "query":
|
|
|
|
times.append( self.render_time(None, t) )
|
2008-04-19 02:55:12 +00:00
|
|
|
elif op == "late":
|
|
|
|
times.append( "late(" + self.render_time(None, t) + ")" )
|
2008-04-17 02:05:41 +00:00
|
|
|
else:
|
2008-04-19 02:55:12 +00:00
|
|
|
times.append( "privkey(" + self.render_time(None, t) + ")" )
|
2008-04-17 02:05:41 +00:00
|
|
|
times_s = ", ".join(times)
|
2012-03-17 23:52:32 +00:00
|
|
|
l[T.li["[%s]: %s" % (server.get_name(), times_s)]]
|
2008-04-17 02:05:41 +00:00
|
|
|
return T.li["Per-Server Response Times: ", l]
|
|
|
|
|
2008-04-21 23:16:55 +00:00
|
|
|
def render_timing_chart(self, ctx, data):
|
|
|
|
imageurl = self._timing_chart()
|
|
|
|
return ctx.tag[imageurl]
|
|
|
|
|
|
|
|
def _timing_chart(self):
|
|
|
|
started = self.update_status.get_started()
|
2008-04-22 00:29:12 +00:00
|
|
|
total = self.update_status.timings.get("total")
|
2008-04-21 23:16:55 +00:00
|
|
|
per_server = self.update_status.timings.get("per_server")
|
2012-03-13 20:26:54 +00:00
|
|
|
# We'd like to use an https: URL here, but the site has a domain/cert mismatch.
|
2008-04-21 23:16:55 +00:00
|
|
|
base = "http://chart.apis.google.com/chart?"
|
2011-01-02 03:42:14 +00:00
|
|
|
pieces = ["cht=bhs"]
|
2008-04-21 23:16:55 +00:00
|
|
|
pieces.append("chco=ffffff,4d89f9,c6d9fd") # colors
|
|
|
|
data0 = []
|
|
|
|
data1 = []
|
|
|
|
data2 = []
|
2011-01-02 03:42:14 +00:00
|
|
|
nb_nodes = 0
|
|
|
|
graph_botom_margin= 21
|
|
|
|
graph_top_margin = 5
|
2012-03-17 23:52:32 +00:00
|
|
|
server_names = []
|
2008-04-21 23:16:55 +00:00
|
|
|
top_abs = started
|
|
|
|
# we sort the queries by the time at which we sent the first request
|
2012-03-17 23:52:32 +00:00
|
|
|
sorttable = [ (times[0][1], server)
|
|
|
|
for server, times in per_server.items() ]
|
2008-04-21 23:16:55 +00:00
|
|
|
sorttable.sort()
|
2012-03-17 23:52:32 +00:00
|
|
|
servers = [t[1] for t in sorttable]
|
2008-04-22 18:51:14 +00:00
|
|
|
|
2012-03-17 23:52:32 +00:00
|
|
|
for server in servers:
|
2011-01-02 03:42:14 +00:00
|
|
|
nb_nodes += 1
|
2012-03-17 23:52:32 +00:00
|
|
|
times = per_server[server]
|
|
|
|
name = server.get_name()
|
|
|
|
server_names.append(name)
|
2008-04-21 23:16:55 +00:00
|
|
|
# for servermap updates, there are either one or two queries per
|
|
|
|
# peer. The second (if present) is to get the privkey.
|
|
|
|
op,q_started,q_elapsed = times[0]
|
|
|
|
data0.append("%.3f" % (q_started-started))
|
|
|
|
data1.append("%.3f" % q_elapsed)
|
|
|
|
top_abs = max(top_abs, q_started+q_elapsed)
|
|
|
|
if len(times) > 1:
|
|
|
|
op,p_started,p_elapsed = times[0]
|
|
|
|
data2.append("%.3f" % p_elapsed)
|
|
|
|
top_abs = max(top_abs, p_started+p_elapsed)
|
|
|
|
else:
|
|
|
|
data2.append("0.0")
|
|
|
|
finished = self.update_status.get_finished()
|
|
|
|
if finished:
|
|
|
|
top_abs = max(top_abs, finished)
|
|
|
|
top_rel = top_abs - started
|
2011-01-02 03:42:14 +00:00
|
|
|
chs ="chs=400x%d" % ( (nb_nodes*28) + graph_top_margin + graph_botom_margin )
|
2008-04-21 23:16:55 +00:00
|
|
|
chd = "chd=t:" + "|".join([",".join(data0),
|
|
|
|
",".join(data1),
|
|
|
|
",".join(data2)])
|
|
|
|
pieces.append(chd)
|
2011-01-02 03:42:14 +00:00
|
|
|
pieces.append(chs)
|
2008-04-21 23:16:55 +00:00
|
|
|
chds = "chds=0,%0.3f" % top_rel
|
|
|
|
pieces.append(chds)
|
|
|
|
pieces.append("chxt=x,y")
|
|
|
|
pieces.append("chxr=0,0.0,%0.3f" % top_rel)
|
2012-03-17 23:52:32 +00:00
|
|
|
pieces.append("chxl=1:|" + "|".join(reversed(server_names)))
|
2008-04-21 23:16:55 +00:00
|
|
|
# use up to 10 grid lines, at decimal multiples.
|
|
|
|
# mathutil.next_power_of_k doesn't handle numbers smaller than one,
|
|
|
|
# unfortunately.
|
|
|
|
#pieces.append("chg="
|
2008-04-22 00:29:12 +00:00
|
|
|
|
|
|
|
if total is not None:
|
|
|
|
finished_f = 1.0 * total / top_rel
|
|
|
|
pieces.append("chm=r,FF0000,0,%0.3f,%0.3f" % (finished_f,
|
|
|
|
finished_f+0.01))
|
2008-04-21 23:16:55 +00:00
|
|
|
url = base + "&".join(pieces)
|
2011-01-02 03:42:14 +00:00
|
|
|
return T.img(src=url,border="1",align="right", float="right")
|
2008-04-21 23:16:55 +00:00
|
|
|
|
2008-03-06 01:41:10 +00:00
|
|
|
|
2008-03-05 21:59:56 +00:00
|
|
|
class Status(rend.Page):
|
|
|
|
docFactory = getxmlfile("status.xhtml")
|
|
|
|
addSlash = True
|
|
|
|
|
Overhaul IFilesystemNode handling, to simplify tests and use POLA internally.
* stop using IURI as an adapter
* pass cap strings around instead of URI instances
* move filenode/dirnode creation duties from Client to new NodeMaker class
* move other Client duties to KeyGenerator, SecretHolder, History classes
* stop passing Client reference to dirnode/filenode constructors
- pass less-powerful references instead, like StorageBroker or Uploader
* always create DirectoryNodes by wrapping a filenode (mutable for now)
* remove some specialized mock classes from unit tests
Detailed list of changes (done one at a time, then merged together)
always pass a string to create_node_from_uri(), not an IURI instance
always pass a string to IFilesystemNode constructors, not an IURI instance
stop using IURI() as an adapter, switch on cap prefix in create_node_from_uri()
client.py: move SecretHolder code out to a separate class
test_web.py: hush pyflakes
client.py: move NodeMaker functionality out into a separate object
LiteralFileNode: stop storing a Client reference
immutable Checker: remove Client reference, it only needs a SecretHolder
immutable Upload: remove Client reference, leave SecretHolder and StorageBroker
immutable Repairer: replace Client reference with StorageBroker and SecretHolder
immutable FileNode: remove Client reference
mutable.Publish: stop passing Client
mutable.ServermapUpdater: get StorageBroker in constructor, not by peeking into Client reference
MutableChecker: reference StorageBroker and History directly, not through Client
mutable.FileNode: removed unused indirection to checker classes
mutable.FileNode: remove Client reference
client.py: move RSA key generation into a separate class, so it can be passed to the nodemaker
move create_mutable_file() into NodeMaker
test_dirnode.py: stop using FakeClient mockups, use NoNetworkGrid instead. This simplifies the code, but takes longer to run (17s instead of 6s). This should come down later when other cleanups make it possible to use simpler (non-RSA) fake mutable files for dirnode tests.
test_mutable.py: clean up basedir names
client.py: move create_empty_dirnode() into NodeMaker
dirnode.py: get rid of DirectoryNode.create
remove DirectoryNode.init_from_uri, refactor NodeMaker for customization, simplify test_web's mock Client to match
stop passing Client to DirectoryNode, make DirectoryNode.create_with_mutablefile the normal DirectoryNode constructor, start removing client from NodeMaker
remove Client from NodeMaker
move helper status into History, pass History to web.Status instead of Client
test_mutable.py: fix minor typo
2009-08-15 11:02:56 +00:00
|
|
|
def __init__(self, history):
|
|
|
|
rend.Page.__init__(self, history)
|
|
|
|
self.history = history
|
2009-02-20 19:15:54 +00:00
|
|
|
|
2008-07-26 00:41:10 +00:00
|
|
|
def renderHTTP(self, ctx):
|
2009-02-20 19:15:54 +00:00
|
|
|
req = inevow.IRequest(ctx)
|
|
|
|
t = get_arg(req, "t")
|
2008-07-26 00:41:10 +00:00
|
|
|
if t == "json":
|
2009-02-20 19:15:54 +00:00
|
|
|
return self.json(req)
|
2008-07-26 00:41:10 +00:00
|
|
|
return rend.Page.renderHTTP(self, ctx)
|
|
|
|
|
2009-02-20 19:15:54 +00:00
|
|
|
def json(self, req):
|
|
|
|
req.setHeader("content-type", "text/plain")
|
2008-07-26 00:41:10 +00:00
|
|
|
data = {}
|
|
|
|
data["active"] = active = []
|
2009-02-20 19:15:54 +00:00
|
|
|
for s in self._get_active_operations():
|
2008-07-26 00:41:10 +00:00
|
|
|
si_s = base32.b2a_or_none(s.get_storage_index())
|
|
|
|
size = s.get_size()
|
|
|
|
status = s.get_status()
|
|
|
|
if IUploadStatus.providedBy(s):
|
|
|
|
h,c,e = s.get_progress()
|
|
|
|
active.append({"type": "upload",
|
|
|
|
"storage-index-string": si_s,
|
|
|
|
"total-size": size,
|
|
|
|
"status": status,
|
|
|
|
"progress-hash": h,
|
|
|
|
"progress-ciphertext": c,
|
|
|
|
"progress-encode-push": e,
|
|
|
|
})
|
|
|
|
elif IDownloadStatus.providedBy(s):
|
|
|
|
active.append({"type": "download",
|
|
|
|
"storage-index-string": si_s,
|
|
|
|
"total-size": size,
|
|
|
|
"status": status,
|
|
|
|
"progress": s.get_progress(),
|
|
|
|
})
|
|
|
|
|
2008-09-15 20:43:14 +00:00
|
|
|
return simplejson.dumps(data, indent=1) + "\n"
|
2008-07-26 00:41:10 +00:00
|
|
|
|
2009-02-20 19:15:54 +00:00
|
|
|
def _get_all_statuses(self):
|
Overhaul IFilesystemNode handling, to simplify tests and use POLA internally.
* stop using IURI as an adapter
* pass cap strings around instead of URI instances
* move filenode/dirnode creation duties from Client to new NodeMaker class
* move other Client duties to KeyGenerator, SecretHolder, History classes
* stop passing Client reference to dirnode/filenode constructors
- pass less-powerful references instead, like StorageBroker or Uploader
* always create DirectoryNodes by wrapping a filenode (mutable for now)
* remove some specialized mock classes from unit tests
Detailed list of changes (done one at a time, then merged together)
always pass a string to create_node_from_uri(), not an IURI instance
always pass a string to IFilesystemNode constructors, not an IURI instance
stop using IURI() as an adapter, switch on cap prefix in create_node_from_uri()
client.py: move SecretHolder code out to a separate class
test_web.py: hush pyflakes
client.py: move NodeMaker functionality out into a separate object
LiteralFileNode: stop storing a Client reference
immutable Checker: remove Client reference, it only needs a SecretHolder
immutable Upload: remove Client reference, leave SecretHolder and StorageBroker
immutable Repairer: replace Client reference with StorageBroker and SecretHolder
immutable FileNode: remove Client reference
mutable.Publish: stop passing Client
mutable.ServermapUpdater: get StorageBroker in constructor, not by peeking into Client reference
MutableChecker: reference StorageBroker and History directly, not through Client
mutable.FileNode: removed unused indirection to checker classes
mutable.FileNode: remove Client reference
client.py: move RSA key generation into a separate class, so it can be passed to the nodemaker
move create_mutable_file() into NodeMaker
test_dirnode.py: stop using FakeClient mockups, use NoNetworkGrid instead. This simplifies the code, but takes longer to run (17s instead of 6s). This should come down later when other cleanups make it possible to use simpler (non-RSA) fake mutable files for dirnode tests.
test_mutable.py: clean up basedir names
client.py: move create_empty_dirnode() into NodeMaker
dirnode.py: get rid of DirectoryNode.create
remove DirectoryNode.init_from_uri, refactor NodeMaker for customization, simplify test_web's mock Client to match
stop passing Client to DirectoryNode, make DirectoryNode.create_with_mutablefile the normal DirectoryNode constructor, start removing client from NodeMaker
remove Client from NodeMaker
move helper status into History, pass History to web.Status instead of Client
test_mutable.py: fix minor typo
2009-08-15 11:02:56 +00:00
|
|
|
h = self.history
|
|
|
|
return itertools.chain(h.list_all_upload_statuses(),
|
|
|
|
h.list_all_download_statuses(),
|
|
|
|
h.list_all_mapupdate_statuses(),
|
|
|
|
h.list_all_publish_statuses(),
|
|
|
|
h.list_all_retrieve_statuses(),
|
|
|
|
h.list_all_helper_statuses(),
|
2008-04-17 20:02:22 +00:00
|
|
|
)
|
|
|
|
|
2008-03-05 21:59:56 +00:00
|
|
|
def data_active_operations(self, ctx, data):
|
2009-02-20 19:15:54 +00:00
|
|
|
return self._get_active_operations()
|
|
|
|
|
|
|
|
def _get_active_operations(self):
|
2008-04-17 20:02:22 +00:00
|
|
|
active = [s
|
2009-02-20 19:15:54 +00:00
|
|
|
for s in self._get_all_statuses()
|
2008-04-17 20:02:22 +00:00
|
|
|
if s.get_active()]
|
2008-03-05 21:59:56 +00:00
|
|
|
return active
|
|
|
|
|
|
|
|
def data_recent_operations(self, ctx, data):
|
2009-02-20 19:15:54 +00:00
|
|
|
return self._get_recent_operations()
|
|
|
|
|
|
|
|
def _get_recent_operations(self):
|
2008-04-17 20:02:22 +00:00
|
|
|
recent = [s
|
2009-02-20 19:15:54 +00:00
|
|
|
for s in self._get_all_statuses()
|
2008-04-17 20:02:22 +00:00
|
|
|
if not s.get_active()]
|
2008-03-05 21:59:56 +00:00
|
|
|
recent.sort(lambda a,b: cmp(a.get_started(), b.get_started()))
|
|
|
|
recent.reverse()
|
|
|
|
return recent
|
|
|
|
|
|
|
|
def render_row(self, ctx, data):
|
|
|
|
s = data
|
|
|
|
|
|
|
|
TIME_FORMAT = "%H:%M:%S %d-%b-%Y"
|
|
|
|
started_s = time.strftime(TIME_FORMAT,
|
|
|
|
time.localtime(s.get_started()))
|
|
|
|
ctx.fillSlots("started", started_s)
|
|
|
|
|
|
|
|
si_s = base32.b2a_or_none(s.get_storage_index())
|
|
|
|
if si_s is None:
|
|
|
|
si_s = "(None)"
|
|
|
|
ctx.fillSlots("si", si_s)
|
|
|
|
ctx.fillSlots("helper", {True: "Yes",
|
|
|
|
False: "No"}[s.using_helper()])
|
|
|
|
|
|
|
|
size = s.get_size()
|
|
|
|
if size is None:
|
|
|
|
size = "(unknown)"
|
2008-05-07 20:53:58 +00:00
|
|
|
elif isinstance(size, (int, long, float)):
|
|
|
|
size = abbreviate_size(size)
|
2008-03-05 21:59:56 +00:00
|
|
|
ctx.fillSlots("total_size", size)
|
|
|
|
|
|
|
|
progress = data.get_progress()
|
|
|
|
if IUploadStatus.providedBy(data):
|
|
|
|
link = "up-%d" % data.get_counter()
|
|
|
|
ctx.fillSlots("type", "upload")
|
|
|
|
# TODO: make an ascii-art bar
|
|
|
|
(chk, ciphertext, encandpush) = progress
|
|
|
|
progress_s = ("hash: %.1f%%, ciphertext: %.1f%%, encode: %.1f%%" %
|
|
|
|
( (100.0 * chk),
|
|
|
|
(100.0 * ciphertext),
|
|
|
|
(100.0 * encandpush) ))
|
|
|
|
ctx.fillSlots("progress", progress_s)
|
|
|
|
elif IDownloadStatus.providedBy(data):
|
|
|
|
link = "down-%d" % data.get_counter()
|
|
|
|
ctx.fillSlots("type", "download")
|
|
|
|
ctx.fillSlots("progress", "%.1f%%" % (100.0 * progress))
|
|
|
|
elif IPublishStatus.providedBy(data):
|
|
|
|
link = "publish-%d" % data.get_counter()
|
|
|
|
ctx.fillSlots("type", "publish")
|
|
|
|
ctx.fillSlots("progress", "%.1f%%" % (100.0 * progress))
|
2008-04-17 02:05:41 +00:00
|
|
|
elif IRetrieveStatus.providedBy(data):
|
2008-03-05 21:59:56 +00:00
|
|
|
ctx.fillSlots("type", "retrieve")
|
|
|
|
link = "retrieve-%d" % data.get_counter()
|
|
|
|
ctx.fillSlots("progress", "%.1f%%" % (100.0 * progress))
|
2008-04-17 02:05:41 +00:00
|
|
|
else:
|
|
|
|
assert IServermapUpdaterStatus.providedBy(data)
|
|
|
|
ctx.fillSlots("type", "mapupdate %s" % data.get_mode())
|
|
|
|
link = "mapupdate-%d" % data.get_counter()
|
|
|
|
ctx.fillSlots("progress", "%.1f%%" % (100.0 * progress))
|
2008-03-05 21:59:56 +00:00
|
|
|
ctx.fillSlots("status", T.a(href=link)[s.get_status()])
|
|
|
|
return ctx.tag
|
|
|
|
|
|
|
|
def childFactory(self, ctx, name):
|
Overhaul IFilesystemNode handling, to simplify tests and use POLA internally.
* stop using IURI as an adapter
* pass cap strings around instead of URI instances
* move filenode/dirnode creation duties from Client to new NodeMaker class
* move other Client duties to KeyGenerator, SecretHolder, History classes
* stop passing Client reference to dirnode/filenode constructors
- pass less-powerful references instead, like StorageBroker or Uploader
* always create DirectoryNodes by wrapping a filenode (mutable for now)
* remove some specialized mock classes from unit tests
Detailed list of changes (done one at a time, then merged together)
always pass a string to create_node_from_uri(), not an IURI instance
always pass a string to IFilesystemNode constructors, not an IURI instance
stop using IURI() as an adapter, switch on cap prefix in create_node_from_uri()
client.py: move SecretHolder code out to a separate class
test_web.py: hush pyflakes
client.py: move NodeMaker functionality out into a separate object
LiteralFileNode: stop storing a Client reference
immutable Checker: remove Client reference, it only needs a SecretHolder
immutable Upload: remove Client reference, leave SecretHolder and StorageBroker
immutable Repairer: replace Client reference with StorageBroker and SecretHolder
immutable FileNode: remove Client reference
mutable.Publish: stop passing Client
mutable.ServermapUpdater: get StorageBroker in constructor, not by peeking into Client reference
MutableChecker: reference StorageBroker and History directly, not through Client
mutable.FileNode: removed unused indirection to checker classes
mutable.FileNode: remove Client reference
client.py: move RSA key generation into a separate class, so it can be passed to the nodemaker
move create_mutable_file() into NodeMaker
test_dirnode.py: stop using FakeClient mockups, use NoNetworkGrid instead. This simplifies the code, but takes longer to run (17s instead of 6s). This should come down later when other cleanups make it possible to use simpler (non-RSA) fake mutable files for dirnode tests.
test_mutable.py: clean up basedir names
client.py: move create_empty_dirnode() into NodeMaker
dirnode.py: get rid of DirectoryNode.create
remove DirectoryNode.init_from_uri, refactor NodeMaker for customization, simplify test_web's mock Client to match
stop passing Client to DirectoryNode, make DirectoryNode.create_with_mutablefile the normal DirectoryNode constructor, start removing client from NodeMaker
remove Client from NodeMaker
move helper status into History, pass History to web.Status instead of Client
test_mutable.py: fix minor typo
2009-08-15 11:02:56 +00:00
|
|
|
h = self.history
|
2008-03-05 21:59:56 +00:00
|
|
|
stype,count_s = name.split("-")
|
|
|
|
count = int(count_s)
|
|
|
|
if stype == "up":
|
Overhaul IFilesystemNode handling, to simplify tests and use POLA internally.
* stop using IURI as an adapter
* pass cap strings around instead of URI instances
* move filenode/dirnode creation duties from Client to new NodeMaker class
* move other Client duties to KeyGenerator, SecretHolder, History classes
* stop passing Client reference to dirnode/filenode constructors
- pass less-powerful references instead, like StorageBroker or Uploader
* always create DirectoryNodes by wrapping a filenode (mutable for now)
* remove some specialized mock classes from unit tests
Detailed list of changes (done one at a time, then merged together)
always pass a string to create_node_from_uri(), not an IURI instance
always pass a string to IFilesystemNode constructors, not an IURI instance
stop using IURI() as an adapter, switch on cap prefix in create_node_from_uri()
client.py: move SecretHolder code out to a separate class
test_web.py: hush pyflakes
client.py: move NodeMaker functionality out into a separate object
LiteralFileNode: stop storing a Client reference
immutable Checker: remove Client reference, it only needs a SecretHolder
immutable Upload: remove Client reference, leave SecretHolder and StorageBroker
immutable Repairer: replace Client reference with StorageBroker and SecretHolder
immutable FileNode: remove Client reference
mutable.Publish: stop passing Client
mutable.ServermapUpdater: get StorageBroker in constructor, not by peeking into Client reference
MutableChecker: reference StorageBroker and History directly, not through Client
mutable.FileNode: removed unused indirection to checker classes
mutable.FileNode: remove Client reference
client.py: move RSA key generation into a separate class, so it can be passed to the nodemaker
move create_mutable_file() into NodeMaker
test_dirnode.py: stop using FakeClient mockups, use NoNetworkGrid instead. This simplifies the code, but takes longer to run (17s instead of 6s). This should come down later when other cleanups make it possible to use simpler (non-RSA) fake mutable files for dirnode tests.
test_mutable.py: clean up basedir names
client.py: move create_empty_dirnode() into NodeMaker
dirnode.py: get rid of DirectoryNode.create
remove DirectoryNode.init_from_uri, refactor NodeMaker for customization, simplify test_web's mock Client to match
stop passing Client to DirectoryNode, make DirectoryNode.create_with_mutablefile the normal DirectoryNode constructor, start removing client from NodeMaker
remove Client from NodeMaker
move helper status into History, pass History to web.Status instead of Client
test_mutable.py: fix minor typo
2009-08-15 11:02:56 +00:00
|
|
|
for s in itertools.chain(h.list_all_upload_statuses(),
|
|
|
|
h.list_all_helper_statuses()):
|
2008-04-17 20:02:22 +00:00
|
|
|
# immutable-upload helpers use the same status object as a
|
|
|
|
# regular immutable-upload
|
2008-03-05 21:59:56 +00:00
|
|
|
if s.get_counter() == count:
|
|
|
|
return UploadStatusPage(s)
|
|
|
|
if stype == "down":
|
Overhaul IFilesystemNode handling, to simplify tests and use POLA internally.
* stop using IURI as an adapter
* pass cap strings around instead of URI instances
* move filenode/dirnode creation duties from Client to new NodeMaker class
* move other Client duties to KeyGenerator, SecretHolder, History classes
* stop passing Client reference to dirnode/filenode constructors
- pass less-powerful references instead, like StorageBroker or Uploader
* always create DirectoryNodes by wrapping a filenode (mutable for now)
* remove some specialized mock classes from unit tests
Detailed list of changes (done one at a time, then merged together)
always pass a string to create_node_from_uri(), not an IURI instance
always pass a string to IFilesystemNode constructors, not an IURI instance
stop using IURI() as an adapter, switch on cap prefix in create_node_from_uri()
client.py: move SecretHolder code out to a separate class
test_web.py: hush pyflakes
client.py: move NodeMaker functionality out into a separate object
LiteralFileNode: stop storing a Client reference
immutable Checker: remove Client reference, it only needs a SecretHolder
immutable Upload: remove Client reference, leave SecretHolder and StorageBroker
immutable Repairer: replace Client reference with StorageBroker and SecretHolder
immutable FileNode: remove Client reference
mutable.Publish: stop passing Client
mutable.ServermapUpdater: get StorageBroker in constructor, not by peeking into Client reference
MutableChecker: reference StorageBroker and History directly, not through Client
mutable.FileNode: removed unused indirection to checker classes
mutable.FileNode: remove Client reference
client.py: move RSA key generation into a separate class, so it can be passed to the nodemaker
move create_mutable_file() into NodeMaker
test_dirnode.py: stop using FakeClient mockups, use NoNetworkGrid instead. This simplifies the code, but takes longer to run (17s instead of 6s). This should come down later when other cleanups make it possible to use simpler (non-RSA) fake mutable files for dirnode tests.
test_mutable.py: clean up basedir names
client.py: move create_empty_dirnode() into NodeMaker
dirnode.py: get rid of DirectoryNode.create
remove DirectoryNode.init_from_uri, refactor NodeMaker for customization, simplify test_web's mock Client to match
stop passing Client to DirectoryNode, make DirectoryNode.create_with_mutablefile the normal DirectoryNode constructor, start removing client from NodeMaker
remove Client from NodeMaker
move helper status into History, pass History to web.Status instead of Client
test_mutable.py: fix minor typo
2009-08-15 11:02:56 +00:00
|
|
|
for s in h.list_all_download_statuses():
|
2008-03-05 21:59:56 +00:00
|
|
|
if s.get_counter() == count:
|
|
|
|
return DownloadStatusPage(s)
|
2008-04-17 02:05:41 +00:00
|
|
|
if stype == "mapupdate":
|
Overhaul IFilesystemNode handling, to simplify tests and use POLA internally.
* stop using IURI as an adapter
* pass cap strings around instead of URI instances
* move filenode/dirnode creation duties from Client to new NodeMaker class
* move other Client duties to KeyGenerator, SecretHolder, History classes
* stop passing Client reference to dirnode/filenode constructors
- pass less-powerful references instead, like StorageBroker or Uploader
* always create DirectoryNodes by wrapping a filenode (mutable for now)
* remove some specialized mock classes from unit tests
Detailed list of changes (done one at a time, then merged together)
always pass a string to create_node_from_uri(), not an IURI instance
always pass a string to IFilesystemNode constructors, not an IURI instance
stop using IURI() as an adapter, switch on cap prefix in create_node_from_uri()
client.py: move SecretHolder code out to a separate class
test_web.py: hush pyflakes
client.py: move NodeMaker functionality out into a separate object
LiteralFileNode: stop storing a Client reference
immutable Checker: remove Client reference, it only needs a SecretHolder
immutable Upload: remove Client reference, leave SecretHolder and StorageBroker
immutable Repairer: replace Client reference with StorageBroker and SecretHolder
immutable FileNode: remove Client reference
mutable.Publish: stop passing Client
mutable.ServermapUpdater: get StorageBroker in constructor, not by peeking into Client reference
MutableChecker: reference StorageBroker and History directly, not through Client
mutable.FileNode: removed unused indirection to checker classes
mutable.FileNode: remove Client reference
client.py: move RSA key generation into a separate class, so it can be passed to the nodemaker
move create_mutable_file() into NodeMaker
test_dirnode.py: stop using FakeClient mockups, use NoNetworkGrid instead. This simplifies the code, but takes longer to run (17s instead of 6s). This should come down later when other cleanups make it possible to use simpler (non-RSA) fake mutable files for dirnode tests.
test_mutable.py: clean up basedir names
client.py: move create_empty_dirnode() into NodeMaker
dirnode.py: get rid of DirectoryNode.create
remove DirectoryNode.init_from_uri, refactor NodeMaker for customization, simplify test_web's mock Client to match
stop passing Client to DirectoryNode, make DirectoryNode.create_with_mutablefile the normal DirectoryNode constructor, start removing client from NodeMaker
remove Client from NodeMaker
move helper status into History, pass History to web.Status instead of Client
test_mutable.py: fix minor typo
2009-08-15 11:02:56 +00:00
|
|
|
for s in h.list_all_mapupdate_statuses():
|
2008-04-17 02:05:41 +00:00
|
|
|
if s.get_counter() == count:
|
|
|
|
return MapupdateStatusPage(s)
|
2008-03-05 21:59:56 +00:00
|
|
|
if stype == "publish":
|
Overhaul IFilesystemNode handling, to simplify tests and use POLA internally.
* stop using IURI as an adapter
* pass cap strings around instead of URI instances
* move filenode/dirnode creation duties from Client to new NodeMaker class
* move other Client duties to KeyGenerator, SecretHolder, History classes
* stop passing Client reference to dirnode/filenode constructors
- pass less-powerful references instead, like StorageBroker or Uploader
* always create DirectoryNodes by wrapping a filenode (mutable for now)
* remove some specialized mock classes from unit tests
Detailed list of changes (done one at a time, then merged together)
always pass a string to create_node_from_uri(), not an IURI instance
always pass a string to IFilesystemNode constructors, not an IURI instance
stop using IURI() as an adapter, switch on cap prefix in create_node_from_uri()
client.py: move SecretHolder code out to a separate class
test_web.py: hush pyflakes
client.py: move NodeMaker functionality out into a separate object
LiteralFileNode: stop storing a Client reference
immutable Checker: remove Client reference, it only needs a SecretHolder
immutable Upload: remove Client reference, leave SecretHolder and StorageBroker
immutable Repairer: replace Client reference with StorageBroker and SecretHolder
immutable FileNode: remove Client reference
mutable.Publish: stop passing Client
mutable.ServermapUpdater: get StorageBroker in constructor, not by peeking into Client reference
MutableChecker: reference StorageBroker and History directly, not through Client
mutable.FileNode: removed unused indirection to checker classes
mutable.FileNode: remove Client reference
client.py: move RSA key generation into a separate class, so it can be passed to the nodemaker
move create_mutable_file() into NodeMaker
test_dirnode.py: stop using FakeClient mockups, use NoNetworkGrid instead. This simplifies the code, but takes longer to run (17s instead of 6s). This should come down later when other cleanups make it possible to use simpler (non-RSA) fake mutable files for dirnode tests.
test_mutable.py: clean up basedir names
client.py: move create_empty_dirnode() into NodeMaker
dirnode.py: get rid of DirectoryNode.create
remove DirectoryNode.init_from_uri, refactor NodeMaker for customization, simplify test_web's mock Client to match
stop passing Client to DirectoryNode, make DirectoryNode.create_with_mutablefile the normal DirectoryNode constructor, start removing client from NodeMaker
remove Client from NodeMaker
move helper status into History, pass History to web.Status instead of Client
test_mutable.py: fix minor typo
2009-08-15 11:02:56 +00:00
|
|
|
for s in h.list_all_publish_statuses():
|
2008-03-05 21:59:56 +00:00
|
|
|
if s.get_counter() == count:
|
|
|
|
return PublishStatusPage(s)
|
|
|
|
if stype == "retrieve":
|
Overhaul IFilesystemNode handling, to simplify tests and use POLA internally.
* stop using IURI as an adapter
* pass cap strings around instead of URI instances
* move filenode/dirnode creation duties from Client to new NodeMaker class
* move other Client duties to KeyGenerator, SecretHolder, History classes
* stop passing Client reference to dirnode/filenode constructors
- pass less-powerful references instead, like StorageBroker or Uploader
* always create DirectoryNodes by wrapping a filenode (mutable for now)
* remove some specialized mock classes from unit tests
Detailed list of changes (done one at a time, then merged together)
always pass a string to create_node_from_uri(), not an IURI instance
always pass a string to IFilesystemNode constructors, not an IURI instance
stop using IURI() as an adapter, switch on cap prefix in create_node_from_uri()
client.py: move SecretHolder code out to a separate class
test_web.py: hush pyflakes
client.py: move NodeMaker functionality out into a separate object
LiteralFileNode: stop storing a Client reference
immutable Checker: remove Client reference, it only needs a SecretHolder
immutable Upload: remove Client reference, leave SecretHolder and StorageBroker
immutable Repairer: replace Client reference with StorageBroker and SecretHolder
immutable FileNode: remove Client reference
mutable.Publish: stop passing Client
mutable.ServermapUpdater: get StorageBroker in constructor, not by peeking into Client reference
MutableChecker: reference StorageBroker and History directly, not through Client
mutable.FileNode: removed unused indirection to checker classes
mutable.FileNode: remove Client reference
client.py: move RSA key generation into a separate class, so it can be passed to the nodemaker
move create_mutable_file() into NodeMaker
test_dirnode.py: stop using FakeClient mockups, use NoNetworkGrid instead. This simplifies the code, but takes longer to run (17s instead of 6s). This should come down later when other cleanups make it possible to use simpler (non-RSA) fake mutable files for dirnode tests.
test_mutable.py: clean up basedir names
client.py: move create_empty_dirnode() into NodeMaker
dirnode.py: get rid of DirectoryNode.create
remove DirectoryNode.init_from_uri, refactor NodeMaker for customization, simplify test_web's mock Client to match
stop passing Client to DirectoryNode, make DirectoryNode.create_with_mutablefile the normal DirectoryNode constructor, start removing client from NodeMaker
remove Client from NodeMaker
move helper status into History, pass History to web.Status instead of Client
test_mutable.py: fix minor typo
2009-08-15 11:02:56 +00:00
|
|
|
for s in h.list_all_retrieve_statuses():
|
2008-03-05 21:59:56 +00:00
|
|
|
if s.get_counter() == count:
|
|
|
|
return RetrieveStatusPage(s)
|
|
|
|
|
|
|
|
|
2008-03-27 23:46:08 +00:00
|
|
|
class HelperStatus(rend.Page):
|
|
|
|
docFactory = getxmlfile("helper.xhtml")
|
|
|
|
|
2009-02-20 19:15:54 +00:00
|
|
|
def __init__(self, helper):
|
|
|
|
rend.Page.__init__(self, helper)
|
|
|
|
self.helper = helper
|
|
|
|
|
2008-03-27 23:46:08 +00:00
|
|
|
def renderHTTP(self, ctx):
|
2009-02-20 19:15:54 +00:00
|
|
|
req = inevow.IRequest(ctx)
|
|
|
|
t = get_arg(req, "t")
|
2008-03-27 23:46:08 +00:00
|
|
|
if t == "json":
|
2009-02-20 19:15:54 +00:00
|
|
|
return self.render_JSON(req)
|
2008-03-27 23:46:08 +00:00
|
|
|
return rend.Page.renderHTTP(self, ctx)
|
|
|
|
|
2009-02-20 19:15:54 +00:00
|
|
|
def data_helper_stats(self, ctx, data):
|
|
|
|
return self.helper.get_stats()
|
2008-03-27 23:46:08 +00:00
|
|
|
|
2009-02-20 19:15:54 +00:00
|
|
|
def render_JSON(self, req):
|
|
|
|
req.setHeader("content-type", "text/plain")
|
|
|
|
if self.helper:
|
|
|
|
stats = self.helper.get_stats()
|
|
|
|
return simplejson.dumps(stats, indent=1) + "\n"
|
|
|
|
return simplejson.dumps({}) + "\n"
|
2008-03-27 23:46:08 +00:00
|
|
|
|
|
|
|
def render_active_uploads(self, ctx, data):
|
2008-04-14 20:18:53 +00:00
|
|
|
return data["chk_upload_helper.active_uploads"]
|
2008-03-27 23:46:08 +00:00
|
|
|
|
|
|
|
def render_incoming(self, ctx, data):
|
2008-04-14 20:18:53 +00:00
|
|
|
return "%d bytes in %d files" % (data["chk_upload_helper.incoming_size"],
|
|
|
|
data["chk_upload_helper.incoming_count"])
|
2008-03-27 23:46:08 +00:00
|
|
|
|
|
|
|
def render_encoding(self, ctx, data):
|
2008-04-14 20:18:53 +00:00
|
|
|
return "%d bytes in %d files" % (data["chk_upload_helper.encoding_size"],
|
|
|
|
data["chk_upload_helper.encoding_count"])
|
2008-03-27 23:46:08 +00:00
|
|
|
|
|
|
|
def render_upload_requests(self, ctx, data):
|
2008-04-14 20:18:53 +00:00
|
|
|
return str(data["chk_upload_helper.upload_requests"])
|
2008-03-27 23:46:08 +00:00
|
|
|
|
|
|
|
def render_upload_already_present(self, ctx, data):
|
2008-04-14 20:18:53 +00:00
|
|
|
return str(data["chk_upload_helper.upload_already_present"])
|
2008-03-27 23:46:08 +00:00
|
|
|
|
|
|
|
def render_upload_need_upload(self, ctx, data):
|
2008-04-14 20:18:53 +00:00
|
|
|
return str(data["chk_upload_helper.upload_need_upload"])
|
2008-03-27 23:46:08 +00:00
|
|
|
|
|
|
|
def render_upload_bytes_fetched(self, ctx, data):
|
2008-04-14 20:18:53 +00:00
|
|
|
return str(data["chk_upload_helper.fetched_bytes"])
|
2008-03-27 23:46:08 +00:00
|
|
|
|
|
|
|
def render_upload_bytes_encoded(self, ctx, data):
|
2008-04-14 20:18:53 +00:00
|
|
|
return str(data["chk_upload_helper.encoded_bytes"])
|
2008-03-27 23:46:08 +00:00
|
|
|
|
2008-04-14 21:17:08 +00:00
|
|
|
|
|
|
|
class Statistics(rend.Page):
|
|
|
|
docFactory = getxmlfile("statistics.xhtml")
|
|
|
|
|
2009-02-20 19:15:54 +00:00
|
|
|
def __init__(self, provider):
|
|
|
|
rend.Page.__init__(self, provider)
|
|
|
|
self.provider = provider
|
|
|
|
|
2008-04-14 21:17:08 +00:00
|
|
|
def renderHTTP(self, ctx):
|
2009-02-20 19:15:54 +00:00
|
|
|
req = inevow.IRequest(ctx)
|
|
|
|
t = get_arg(req, "t")
|
2008-04-14 21:17:08 +00:00
|
|
|
if t == "json":
|
2009-02-20 19:15:54 +00:00
|
|
|
stats = self.provider.get_stats()
|
|
|
|
req.setHeader("content-type", "text/plain")
|
2008-09-15 20:43:14 +00:00
|
|
|
return simplejson.dumps(stats, indent=1) + "\n"
|
2008-04-14 21:17:08 +00:00
|
|
|
return rend.Page.renderHTTP(self, ctx)
|
|
|
|
|
2009-02-20 19:15:54 +00:00
|
|
|
def data_get_stats(self, ctx, data):
|
|
|
|
return self.provider.get_stats()
|
|
|
|
|
2008-04-14 21:17:08 +00:00
|
|
|
def render_load_average(self, ctx, data):
|
|
|
|
return str(data["stats"].get("load_monitor.avg_load"))
|
|
|
|
|
|
|
|
def render_peak_load(self, ctx, data):
|
|
|
|
return str(data["stats"].get("load_monitor.max_load"))
|
|
|
|
|
|
|
|
def render_uploads(self, ctx, data):
|
2008-04-30 01:20:05 +00:00
|
|
|
files = data["counters"].get("uploader.files_uploaded", 0)
|
|
|
|
bytes = data["counters"].get("uploader.bytes_uploaded", 0)
|
2008-04-14 21:17:08 +00:00
|
|
|
return ("%s files / %s bytes (%s)" %
|
|
|
|
(files, bytes, abbreviate_size(bytes)))
|
|
|
|
|
|
|
|
def render_downloads(self, ctx, data):
|
2008-04-30 01:20:05 +00:00
|
|
|
files = data["counters"].get("downloader.files_downloaded", 0)
|
|
|
|
bytes = data["counters"].get("downloader.bytes_downloaded", 0)
|
2008-04-14 21:17:08 +00:00
|
|
|
return ("%s files / %s bytes (%s)" %
|
|
|
|
(files, bytes, abbreviate_size(bytes)))
|
|
|
|
|
|
|
|
def render_publishes(self, ctx, data):
|
2008-06-16 23:37:04 +00:00
|
|
|
files = data["counters"].get("mutable.files_published", 0)
|
2008-04-30 01:20:05 +00:00
|
|
|
bytes = data["counters"].get("mutable.bytes_published", 0)
|
|
|
|
return "%s files / %s bytes (%s)" % (files, bytes,
|
|
|
|
abbreviate_size(bytes))
|
2008-04-14 21:17:08 +00:00
|
|
|
|
|
|
|
def render_retrieves(self, ctx, data):
|
2008-06-16 23:37:04 +00:00
|
|
|
files = data["counters"].get("mutable.files_retrieved", 0)
|
2008-04-30 01:20:05 +00:00
|
|
|
bytes = data["counters"].get("mutable.bytes_retrieved", 0)
|
|
|
|
return "%s files / %s bytes (%s)" % (files, bytes,
|
|
|
|
abbreviate_size(bytes))
|
2008-04-14 21:17:08 +00:00
|
|
|
|
2011-08-08 23:40:49 +00:00
|
|
|
def render_drop_monitored(self, ctx, data):
|
|
|
|
dirs = data["counters"].get("drop_upload.dirs_monitored", 0)
|
|
|
|
return "%s directories" % (dirs,)
|
|
|
|
|
|
|
|
def render_drop_uploads(self, ctx, data):
|
|
|
|
# TODO: bytes uploaded
|
|
|
|
files = data["counters"].get("drop_upload.files_uploaded", 0)
|
|
|
|
return "%s files" % (files,)
|
|
|
|
|
|
|
|
def render_drop_queued(self, ctx, data):
|
|
|
|
files = data["counters"].get("drop_upload.files_queued", 0)
|
|
|
|
return "%s files" % (files,)
|
|
|
|
|
|
|
|
def render_drop_failed(self, ctx, data):
|
|
|
|
files = data["counters"].get("drop_upload.files_failed", 0)
|
|
|
|
return "%s files" % (files,)
|
|
|
|
|
2008-04-14 21:17:08 +00:00
|
|
|
def render_raw(self, ctx, data):
|
|
|
|
raw = pprint.pformat(data)
|
|
|
|
return ctx.tag[raw]
|