Ticket #287: fast-servers-first-0.darcspatch.txt

File fast-servers-first-0.darcspatch.txt, 74.7 KB (added by zooko, at 2010-02-01T06:41:27Z)

Here is a patch which adds a new feature: remember the order servers answered and use the first servers first. Tests by David-Sarah.

Line 
1Sun Jan 31 23:16:10 MST 2010  zooko@zooko.com
2  * immutable: downloader accepts notifications of buckets even if those notifications arrive after he has begun downloading shares.
3  This can be useful if one of the ones that he has already begun downloading fails. See #287 for discussion. This fixes part of #287 which part was a regression caused by #928, namely this fixes fail-over in case a share is corrupted (or the server returns an error or disconnects). This does not fix the related issue mentioned in #287 if a server hangs and doesn't reply to requests for blocks.
4 
5
6Sun Jan 31 23:32:11 MST 2010  zooko@zooko.com
7  * immutable: downloader remembers what order the servers responded in and uses the lowest-latency servers first
8
9New patches:
10
11[immutable: downloader accepts notifications of buckets even if those notifications arrive after he has begun downloading shares.
12zooko@zooko.com**20100201061610
13 Ignore-this: 5b09709f27603a3157eba7ba70028955
14 This can be useful if one of the ones that he has already begun downloading fails. See #287 for discussion. This fixes part of #287 which part was a regression caused by #928, namely this fixes fail-over in case a share is corrupted (or the server returns an error or disconnects). This does not fix the related issue mentioned in #287 if a server hangs and doesn't reply to requests for blocks.
15 
16] {
17hunk ./src/allmydata/immutable/download.py 792
18 
19         self.active_buckets = {} # k: shnum, v: bucket
20         self._share_buckets = {} # k: sharenum, v: list of buckets
21-        self._share_vbuckets = {} # k: shnum, v: set of ValidatedBuckets
22+
23+        # _download_all_segments() will set this to:
24+        # self._share_vbuckets = {} # k: shnum, v: set of ValidatedBuckets
25+        self._share_vbuckets = None
26 
27         self._fetch_failures = {"uri_extension": 0, "crypttext_hash_tree": 0, }
28 
29hunk ./src/allmydata/immutable/download.py 815
30         # self._responses_received = 0
31         # self._queries_failed = 0
32 
33+        # This is solely for the use of unit tests. It will be triggered when
34+        # we start downloading shares.
35+        self._stage_4_d = defer.Deferred()
36+
37     def pauseProducing(self):
38         if self._paused:
39             return
40hunk ./src/allmydata/immutable/download.py 948
41                 reactor.callLater(0, self._wait_for_enough_buckets_d.callback, True)
42                 self._wait_for_enough_buckets_d = None
43 
44+            if self._share_vbuckets is not None:
45+                vbucket = ValidatedReadBucketProxy(sharenum, b, self._share_hash_tree, self._vup.num_segments, self._vup.block_size, self._vup.share_size)
46+                self._share_vbuckets.setdefault(sharenum, set()).add(vbucket)
47+
48             if self._results:
49                 if peerid not in self._results.servermap:
50                     self._results.servermap[peerid] = set()
51hunk ./src/allmydata/immutable/download.py 1102
52 
53 
54     def _download_all_segments(self, res):
55+        # From now on if new buckets are received then I will notice that
56+        # self._share_vbuckets is not None and generate a vbucket for that new
57+        # bucket and add it in to _share_vbuckets. (We had to wait because we
58+        # didn't have self._vup and self._share_hash_tree earlier. We didn't
59+        # need validated buckets until now -- now that we are ready to download
60+        # shares.)
61+        self._share_vbuckets = {}
62         for sharenum, buckets in self._share_buckets.iteritems():
63             for bucket in buckets:
64                 vbucket = ValidatedReadBucketProxy(sharenum, bucket, self._share_hash_tree, self._vup.num_segments, self._vup.block_size, self._vup.share_size)
65hunk ./src/allmydata/immutable/download.py 1130
66             # this pause, at the end of write, prevents pre-fetch from
67             # happening until the consumer is ready for more data.
68             d.addCallback(self._check_for_pause)
69+
70+        self._stage_4_d.callback(None)
71         return d
72 
73     def _check_for_pause(self, res):
74hunk ./src/allmydata/test/no_network.py 255
75 
76     def break_server(self, serverid):
77         # mark the given server as broken, so it will throw exceptions when
78-        # asked to hold a share
79+        # asked to hold a share or serve a share
80         self.servers_by_id[serverid].broken = True
81 
82hunk ./src/allmydata/test/no_network.py 258
83-    def hang_server(self, serverid, until=defer.Deferred()):
84-        # hang the given server until 'until' fires
85-        self.servers_by_id[serverid].hung_until = until
86+    def hang_server(self, serverid):
87+        # hang the given server
88+        ss = self.servers_by_id[serverid]
89+        assert ss.hung_until is None
90+        ss.hung_until = defer.Deferred()
91+
92+    def unhang_server(self, serverid):
93+        # unhang the given server
94+        ss = self.servers_by_id[serverid]
95+        assert ss.hung_until is not None
96+        ss.hung_until.callback(None)
97+        ss.hung_until = None
98 
99 
100 class GridTestMixin:
101hunk ./src/allmydata/test/test_hung_server.py 4
102 
103 import os, shutil
104 from twisted.trial import unittest
105-from twisted.internet import defer, reactor
106+from twisted.internet import defer
107 from allmydata import uri
108 from allmydata.util.consumer import download_to_data
109 from allmydata.immutable import upload
110hunk ./src/allmydata/test/test_hung_server.py 11
111 from allmydata.mutable.common import UnrecoverableFileError
112 from allmydata.storage.common import storage_index_to_dir
113 from allmydata.test.no_network import GridTestMixin
114-from allmydata.test.common import ShouldFailMixin
115+from allmydata.test.common import ShouldFailMixin, _corrupt_share_data
116 from allmydata.interfaces import NotEnoughSharesError
117 
118 immutable_plaintext = "data" * 10000
119hunk ./src/allmydata/test/test_hung_server.py 28
120         for (id, ss) in servers:
121             self.g.hang_server(id, **kwargs)
122 
123+    def _unhang(self, servers, **kwargs):
124+        for (id, ss) in servers:
125+            self.g.unhang_server(id, **kwargs)
126+
127     def _delete_all_shares_from(self, servers):
128         serverids = [id for (id, ss) in servers]
129         for (i_shnum, i_serverid, i_sharefile) in self.shares:
130hunk ./src/allmydata/test/test_hung_server.py 38
131             if i_serverid in serverids:
132                 os.unlink(i_sharefile)
133 
134+    def _corrupt_all_shares_in(self, servers, corruptor_func):
135+        serverids = [id for (id, ss) in servers]
136+        for (i_shnum, i_serverid, i_sharefile) in self.shares:
137+            if i_serverid in serverids:
138+                self._corrupt_share((i_shnum, i_sharefile), corruptor_func)
139+
140     def _copy_all_shares_from(self, from_servers, to_server):
141         serverids = [id for (id, ss) in from_servers]
142         for (i_shnum, i_serverid, i_sharefile) in self.shares:
143hunk ./src/allmydata/test/test_hung_server.py 65
144          self.failUnless((sharenum, ss.original.my_nodeid, new_sharefile)
145                          in self.shares)
146 
147+    def _corrupt_share(self, share, corruptor_func):
148+        (sharenum, sharefile) = share
149+        data = open(sharefile, "rb").read()
150+        newdata = corruptor_func(data)
151+        os.unlink(sharefile)
152+        wf = open(sharefile, "wb")
153+        wf.write(newdata)
154+        wf.close()
155+
156     def _set_up(self, mutable, testdir, num_clients=1, num_servers=10):
157         self.mutable = mutable
158         if mutable:
159hunk ./src/allmydata/test/test_hung_server.py 102
160             d.addCallback(_uploaded_immutable)
161         return d
162 
163-    def _check_download(self):
164+    def _start_download(self):
165         n = self.c0.create_node_from_uri(self.uri)
166         if self.mutable:
167             d = n.download_best_version()
168hunk ./src/allmydata/test/test_hung_server.py 106
169-            expected_plaintext = mutable_plaintext
170+            stage_4_d = None # currently we aren't doing any tests which require this for mutable files
171+        else:
172+            d = download_to_data(n)
173+            stage_4_d = n._downloader._all_downloads.keys()[0]._stage_4_d # too ugly! FIXME
174+        return (d, stage_4_d,)
175+
176+    def _wait_for_data(self, n):
177+        if self.mutable:
178+            d = n.download_best_version()
179         else:
180             d = download_to_data(n)
181hunk ./src/allmydata/test/test_hung_server.py 117
182-            expected_plaintext = immutable_plaintext
183-        def _got_data(data):
184-            self.failUnlessEqual(data, expected_plaintext)
185-        d.addCallback(_got_data)
186+        return d
187+
188+    def _check(self, resultingdata):
189+        if self.mutable:
190+            self.failUnlessEqual(resultingdata, mutable_plaintext)
191+        else:
192+            self.failUnlessEqual(resultingdata, immutable_plaintext)
193+
194+    def _download_and_check(self):
195+        d, stage4d = self._start_download()
196+        d.addCallback(self._check)
197         return d
198 
199     def _should_fail_download(self):
200hunk ./src/allmydata/test/test_hung_server.py 134
201         if self.mutable:
202             return self.shouldFail(UnrecoverableFileError, self.basedir,
203                                    "no recoverable versions",
204-                                   self._check_download)
205+                                   self._download_and_check)
206         else:
207             return self.shouldFail(NotEnoughSharesError, self.basedir,
208                                    "Failed to get enough shareholders",
209hunk ./src/allmydata/test/test_hung_server.py 138
210-                                   self._check_download)
211+                                   self._download_and_check)
212 
213 
214     def test_10_good_sanity_check(self):
215hunk ./src/allmydata/test/test_hung_server.py 145
216         d = defer.succeed(None)
217         for mutable in [False, True]:
218             d.addCallback(lambda ign: self._set_up(mutable, "test_10_good_sanity_check"))
219-            d.addCallback(lambda ign: self._check_download())
220+            d.addCallback(lambda ign: self._download_and_check())
221         return d
222 
223     def test_10_good_copied_share(self):
224hunk ./src/allmydata/test/test_hung_server.py 153
225         for mutable in [False, True]:
226             d.addCallback(lambda ign: self._set_up(mutable, "test_10_good_copied_share"))
227             d.addCallback(lambda ign: self._copy_all_shares_from(self.servers[2:3], self.servers[0]))
228-            d.addCallback(lambda ign: self._check_download())
229+            d.addCallback(lambda ign: self._download_and_check())
230             return d
231 
232     def test_3_good_7_noshares(self):
233hunk ./src/allmydata/test/test_hung_server.py 161
234         for mutable in [False, True]:
235             d.addCallback(lambda ign: self._set_up(mutable, "test_3_good_7_noshares"))
236             d.addCallback(lambda ign: self._delete_all_shares_from(self.servers[3:]))
237-            d.addCallback(lambda ign: self._check_download())
238+            d.addCallback(lambda ign: self._download_and_check())
239         return d
240 
241     def test_2_good_8_broken_fail(self):
242hunk ./src/allmydata/test/test_hung_server.py 186
243             d.addCallback(lambda ign: self._set_up(mutable, "test_2_good_8_broken_copied_share"))
244             d.addCallback(lambda ign: self._copy_all_shares_from(self.servers[2:3], self.servers[0]))
245             d.addCallback(lambda ign: self._break(self.servers[2:]))
246-            d.addCallback(lambda ign: self._check_download())
247+            d.addCallback(lambda ign: self._download_and_check())
248         return d
249 
250     def test_2_good_8_broken_duplicate_share_fail(self):
251hunk ./src/allmydata/test/test_hung_server.py 205
252         for mutable in [False]:
253             d.addCallback(lambda ign: self._set_up(mutable, "test_3_good_7_hung"))
254             d.addCallback(lambda ign: self._hang(self.servers[3:]))
255-            d.addCallback(lambda ign: self._check_download())
256+            d.addCallback(lambda ign: self._download_and_check())
257         return d
258 
259     def test_2_good_8_hung_then_1_recovers(self):
260hunk ./src/allmydata/test/test_hung_server.py 211
261         d = defer.succeed(None)
262         for mutable in [False]:
263-            recovered = defer.Deferred()
264             d.addCallback(lambda ign: self._set_up(mutable, "test_2_good_8_hung_then_1_recovers"))
265hunk ./src/allmydata/test/test_hung_server.py 212
266-            d.addCallback(lambda ign: self._hang(self.servers[2:3], until=recovered))
267+            d.addCallback(lambda ign: self._hang(self.servers[2:3]))
268             d.addCallback(lambda ign: self._hang(self.servers[3:]))
269hunk ./src/allmydata/test/test_hung_server.py 214
270-            d.addCallback(lambda ign: reactor.callLater(5, recovered.callback, None))
271-            d.addCallback(lambda ign: self._check_download())
272+            d.addCallback(lambda ign: self._unhang(self.servers[2:3]))
273+            d.addCallback(lambda ign: self._download_and_check())
274         return d
275 
276     def test_2_good_8_hung_then_1_recovers_with_2_shares(self):
277hunk ./src/allmydata/test/test_hung_server.py 221
278         d = defer.succeed(None)
279         for mutable in [False]:
280-            recovered = defer.Deferred()
281             d.addCallback(lambda ign: self._set_up(mutable, "test_2_good_8_hung_then_1_recovers_with_2_shares"))
282             d.addCallback(lambda ign: self._copy_all_shares_from(self.servers[0:1], self.servers[2]))
283hunk ./src/allmydata/test/test_hung_server.py 223
284-            d.addCallback(lambda ign: self._hang(self.servers[2:3], until=recovered))
285+            d.addCallback(lambda ign: self._hang(self.servers[2:3]))
286+            d.addCallback(lambda ign: self._hang(self.servers[3:]))
287+            d.addCallback(lambda ign: self._unhang(self.servers[2:3]))
288+            d.addCallback(lambda ign: self._download_and_check())
289+        return d
290+
291+    def test_failover_during_stage_4(self):
292+        # See #287
293+        d = defer.succeed(None)
294+        for mutable in [False]:
295+            d.addCallback(lambda ign: self._set_up(mutable, "test_failover_during_stage_4"))
296+            d.addCallback(lambda ign: self._corrupt_all_shares_in(self.servers[2:3], _corrupt_share_data))
297+            d.addCallback(lambda ign: self._set_up(mutable, "test_failover_during_stage_4"))
298             d.addCallback(lambda ign: self._hang(self.servers[3:]))
299hunk ./src/allmydata/test/test_hung_server.py 237
300-            d.addCallback(lambda ign: reactor.callLater(5, recovered.callback, None))
301-            d.addCallback(lambda ign: self._check_download())
302+            d.addCallback(lambda ign: self._start_download())
303+            def _after_starting_download((doned, started4d)):
304+                started4d.addCallback(lambda ign: self._unhang(self.servers[3:4]))
305+                doned.addCallback(self._check)
306+                return doned
307+            d.addCallback(_after_starting_download)
308+
309         return d
310}
311[immutable: downloader remembers what order the servers responded in and uses the lowest-latency servers first
312zooko@zooko.com**20100201063211
313 Ignore-this: 2d365d92bf4b858afbce399f2e045818
314] {
315hunk ./src/allmydata/immutable/download.py 790
316         self._monitor = monitor
317         self._opened = False
318 
319-        self.active_buckets = {} # k: shnum, v: bucket
320-        self._share_buckets = {} # k: sharenum, v: list of buckets
321-
322-        # _download_all_segments() will set this to:
323-        # self._share_vbuckets = {} # k: shnum, v: set of ValidatedBuckets
324+        # We use buckets in the order they were received, which means we tend
325+        # to use faster, less loaded servers. See #928 and #287.
326+        self._share_buckets = [] # list of (sharenum, bucket)
327+        # _download_all_segments() will set self._share_vbuckets to:
328+        # self._share_vbuckets = [] # list of (sharenum, ValidatedBucket)
329+        # ... and it will set self._share_buckets to None
330         self._share_vbuckets = None
331 
332hunk ./src/allmydata/immutable/download.py 798
333+        # _unique_shares_avail is for counting whether we have enough unique
334+        # shares known. We count keys in this dict.
335+        self._unique_shares_avail = {} # k: sharenum, v: set of buckets
336+
337+        self.active_buckets = {} # k: shnum, v: bucket
338+
339         self._fetch_failures = {"uri_extension": 0, "crypttext_hash_tree": 0, }
340 
341         self._ciphertext_hasher = hashutil.crypttext_hasher()
342hunk ./src/allmydata/immutable/download.py 947
343                                      self._total_queries))
344         for sharenum, bucket in buckets.iteritems():
345             b = layout.ReadBucketProxy(bucket, peerid, self._storage_index)
346-            self.add_share_bucket(sharenum, b)
347-            # If we just got enough buckets for the first time, then fire the
348-            # deferred. Then remove it from self so that we don't fire it
349-            # again.
350-            if self._wait_for_enough_buckets_d and len(self._share_buckets) >= self._verifycap.needed_shares:
351-                reactor.callLater(0, self._wait_for_enough_buckets_d.callback, True)
352-                self._wait_for_enough_buckets_d = None
353-
354-            if self._share_vbuckets is not None:
355+            assert (self._share_vbuckets is None) or (self._share_buckets is None)
356+            # If we have not yet started stage 4 of download:
357+            if self._share_vbuckets is None:
358+                self.add_share_bucket(sharenum, b)
359+                # If we just got enough buckets for the first time, then fire the
360+                # deferred. Then remove it from self so that we don't fire it
361+                # again.
362+                if self._wait_for_enough_buckets_d and len(self._unique_shares_avail) >= self._verifycap.needed_shares:
363+                    reactor.callLater(0, self._wait_for_enough_buckets_d.callback, True)
364+                    self._wait_for_enough_buckets_d = None
365+            else:
366                 vbucket = ValidatedReadBucketProxy(sharenum, b, self._share_hash_tree, self._vup.num_segments, self._vup.block_size, self._vup.share_size)
367hunk ./src/allmydata/immutable/download.py 959
368-                self._share_vbuckets.setdefault(sharenum, set()).add(vbucket)
369+                self._share_vbuckets.append((sharenum, vbucket))
370 
371             if self._results:
372                 if peerid not in self._results.servermap:
373hunk ./src/allmydata/immutable/download.py 968
374 
375     def add_share_bucket(self, sharenum, bucket):
376         # this is split out for the benefit of test_encode.py
377-        self._share_buckets.setdefault(sharenum, []).append(bucket)
378+        self._share_buckets.append((sharenum, bucket))
379+        self._unique_shares_avail.setdefault(sharenum, set()).add(bucket)
380 
381     def _got_error(self, f):
382         self._queries_failed += 1
383hunk ./src/allmydata/immutable/download.py 982
384     def bucket_failed(self, vbucket):
385         shnum = vbucket.sharenum
386         del self.active_buckets[shnum]
387-        s = self._share_vbuckets[shnum]
388-        # s is a set of ValidatedReadBucketProxy instances
389-        s.remove(vbucket)
390+        s = self._unique_shares_avail[shnum]
391+        s.remove(vbucket.bucket)
392+        self._share_vbuckets.remove((shnum, vbucket))
393+        # s is a set of ReadBucketProxy instances
394         # ... which might now be empty
395         if not s:
396             # there are no more buckets which can provide this share, so
397hunk ./src/allmydata/immutable/download.py 990
398             # remove the key. This may prompt us to use a different share.
399-            del self._share_vbuckets[shnum]
400+            del self._unique_shares_avail[shnum]
401 
402     def _got_all_shareholders(self, res):
403         if self._results:
404hunk ./src/allmydata/immutable/download.py 997
405             now = time.time()
406             self._results.timings["peer_selection"] = now - self._started
407 
408-        if len(self._share_buckets) < self._verifycap.needed_shares:
409+        if len(self._unique_shares_avail) < self._verifycap.needed_shares:
410             msg = "Failed to get enough shareholders: have %d, need %d" \
411hunk ./src/allmydata/immutable/download.py 999
412-                  % (len(self._share_buckets), self._verifycap.needed_shares)
413-            if self._share_buckets:
414+                  % (len(self._unique_shares_avail), self._verifycap.needed_shares)
415+            if self._unique_shares_avail:
416                 raise NotEnoughSharesError(msg)
417             else:
418                 raise NoSharesError(msg)
419hunk ./src/allmydata/immutable/download.py 1021
420         uri_extension_fetch_started = time.time()
421 
422         vups = []
423-        for sharenum, buckets in self._share_buckets.iteritems():
424-            for bucket in buckets:
425-                vups.append(ValidatedExtendedURIProxy(bucket, self._verifycap, self._fetch_failures))
426+        for sharenum, bucket in self._share_buckets:
427+            vups.append(ValidatedExtendedURIProxy(bucket, self._verifycap, self._fetch_failures))
428         vto = ValidatedThingObtainer(vups, debugname="vups", log_id=self._parentmsgid)
429         d = vto.start()
430 
431hunk ./src/allmydata/immutable/download.py 1058
432 
433     def _get_crypttext_hash_tree(self, res):
434         vchtps = []
435-        for sharenum, buckets in self._share_buckets.iteritems():
436-            for bucket in buckets:
437-                vchtp = ValidatedCrypttextHashTreeProxy(bucket, self._crypttext_hash_tree, self._vup.num_segments, self._fetch_failures)
438-                vchtps.append(vchtp)
439+        for sharenum, bucket in self._share_buckets:
440+            vchtp = ValidatedCrypttextHashTreeProxy(bucket, self._crypttext_hash_tree, self._vup.num_segments, self._fetch_failures)
441+            vchtps.append(vchtp)
442 
443         _get_crypttext_hash_tree_started = time.time()
444         if self._status:
445hunk ./src/allmydata/immutable/download.py 1083
446         """either return a mapping from shnum to a ValidatedReadBucketProxy
447         that can provide data for that share, or raise NotEnoughSharesError"""
448 
449-        while len(self.active_buckets) < self._verifycap.needed_shares:
450+        if len(self.active_buckets) < self._verifycap.needed_shares:
451             # need some more
452             handled_shnums = set(self.active_buckets.keys())
453hunk ./src/allmydata/immutable/download.py 1086
454-            available_shnums = set(self._share_vbuckets.keys())
455-            potential_shnums = list(available_shnums - handled_shnums)
456+            available_shnums = set(self._unique_shares_avail.keys())
457+            potential_shnums = available_shnums - handled_shnums
458             if len(potential_shnums) < (self._verifycap.needed_shares
459                                         - len(self.active_buckets)):
460                 have = len(potential_shnums) + len(self.active_buckets)
461hunk ./src/allmydata/immutable/download.py 1097
462                     raise NotEnoughSharesError(msg)
463                 else:
464                     raise NoSharesError(msg)
465-            # For the next share, choose a primary share if available, else a
466-            # randomly chosen secondary share.
467-            potential_shnums.sort()
468-            if potential_shnums[0] < self._verifycap.needed_shares:
469-                shnum = potential_shnums[0]
470-            else:
471-                shnum = random.choice(potential_shnums)
472-            # and a random bucket that will provide it
473-            validated_bucket = random.choice(list(self._share_vbuckets[shnum]))
474-            self.active_buckets[shnum] = validated_bucket
475+            # For the next share, choose the first bucket which has a sharenum
476+            # we aren't already using.
477+            for (shnum, vbucket) in self._share_vbuckets:
478+                if not self.active_buckets.has_key(shnum):
479+                    self.active_buckets[shnum] = vbucket
480+                    if len(self.active_buckets) >= self._verifycap.needed_shares:
481+                        break
482         return self.active_buckets
483 
484hunk ./src/allmydata/immutable/download.py 1106
485-
486     def _download_all_segments(self, res):
487         # From now on if new buckets are received then I will notice that
488         # self._share_vbuckets is not None and generate a vbucket for that new
489hunk ./src/allmydata/immutable/download.py 1113
490         # didn't have self._vup and self._share_hash_tree earlier. We didn't
491         # need validated buckets until now -- now that we are ready to download
492         # shares.)
493-        self._share_vbuckets = {}
494-        for sharenum, buckets in self._share_buckets.iteritems():
495-            for bucket in buckets:
496-                vbucket = ValidatedReadBucketProxy(sharenum, bucket, self._share_hash_tree, self._vup.num_segments, self._vup.block_size, self._vup.share_size)
497-                self._share_vbuckets.setdefault(sharenum, set()).add(vbucket)
498+        self._share_vbuckets = []
499+        for sharenum, bucket in self._share_buckets:
500+            vbucket = ValidatedReadBucketProxy(sharenum, bucket, self._share_hash_tree, self._vup.num_segments, self._vup.block_size, self._vup.share_size)
501+            self._share_vbuckets.append((sharenum, vbucket))
502+        self._share_buckets = None
503 
504         # after the above code, self._share_vbuckets contains enough
505         # buckets to complete the download, and some extra ones to
506hunk ./src/allmydata/immutable/download.py 1125
507         # errors. self._share_vbuckets is a dictionary that maps from
508         # shnum to a set of ValidatedBuckets, which themselves are
509         # wrappers around RIBucketReader references.
510-        self.active_buckets = {} # k: shnum, v: ValidatedReadBucketProxy instance
511 
512         self._started_fetching = time.time()
513 
514hunk ./src/allmydata/test/no_network.py 40
515 class LocalWrapper:
516     def __init__(self, original):
517         self.original = original
518-        self.broken = False
519+        self.pre_call_notifier = None
520         self.hung_until = None
521         self.post_call_notifier = None
522         self.disconnectors = {}
523hunk ./src/allmydata/test/no_network.py 67
524             return meth(*args, **kwargs)
525 
526         def _call():
527-            if self.broken:
528-                raise IntentionalError("I was asked to break")
529+            if self.pre_call_notifier:
530+                self.pre_call_notifier()
531+
532             if self.hung_until:
533                 d2 = defer.Deferred()
534                 self.hung_until.addCallback(lambda ign: _really_call())
535hunk ./src/allmydata/test/no_network.py 257
536     def break_server(self, serverid):
537         # mark the given server as broken, so it will throw exceptions when
538         # asked to hold a share or serve a share
539-        self.servers_by_id[serverid].broken = True
540+        def _break(ign):
541+            raise IntentionalError("I was asked to break")
542+        self.servers_by_id[serverid].pre_call_notifier = _break
543+
544+    def set_server_pre_call_notifier(self, serverid, cb):
545+        self.servers_by_id[serverid].pre_call_notifier = cb
546 
547     def hang_server(self, serverid):
548         # hang the given server
549hunk ./src/allmydata/test/test_hung_server.py 4
550 
551 import os, shutil
552 from twisted.trial import unittest
553-from twisted.internet import defer
554+from twisted.internet import defer, reactor
555 from allmydata import uri
556 from allmydata.util.consumer import download_to_data
557 from allmydata.immutable import upload
558hunk ./src/allmydata/test/test_hung_server.py 24
559         for (id, ss) in servers:
560             self.g.break_server(id)
561 
562+    def _notify(self, servers, cb):
563+        for (id, ss) in servers:
564+            self.g.set_server_pre_call_notifier(id, cb)
565+
566     def _hang(self, servers, **kwargs):
567         for (id, ss) in servers:
568             self.g.hang_server(id, **kwargs)
569hunk ./src/allmydata/test/test_hung_server.py 216
570         d = defer.succeed(None)
571         for mutable in [False]:
572             d.addCallback(lambda ign: self._set_up(mutable, "test_2_good_8_hung_then_1_recovers"))
573-            d.addCallback(lambda ign: self._hang(self.servers[2:3]))
574-            d.addCallback(lambda ign: self._hang(self.servers[3:]))
575-            d.addCallback(lambda ign: self._unhang(self.servers[2:3]))
576+            d.addCallback(lambda ign: self._hang(self.servers[2:]))
577+            def _recover():
578+                self._unhang(self.servers[2:3])
579+            d.addCallback(lambda ign: reactor.callLater(5, _recover))
580             d.addCallback(lambda ign: self._download_and_check())
581         return d
582 
583hunk ./src/allmydata/test/test_hung_server.py 228
584         for mutable in [False]:
585             d.addCallback(lambda ign: self._set_up(mutable, "test_2_good_8_hung_then_1_recovers_with_2_shares"))
586             d.addCallback(lambda ign: self._copy_all_shares_from(self.servers[0:1], self.servers[2]))
587-            d.addCallback(lambda ign: self._hang(self.servers[2:3]))
588-            d.addCallback(lambda ign: self._hang(self.servers[3:]))
589-            d.addCallback(lambda ign: self._unhang(self.servers[2:3]))
590+            d.addCallback(lambda ign: self._hang(self.servers[2:]))
591+            def _recover():
592+                self._unhang(self.servers[2:3])
593+            d.addCallback(lambda ign: reactor.callLater(5, _recover))
594             d.addCallback(lambda ign: self._download_and_check())
595         return d
596 
597hunk ./src/allmydata/test/test_hung_server.py 251
598             d.addCallback(_after_starting_download)
599 
600         return d
601+
602+    def test_use_first_servers_to_reply(self):
603+        d = defer.succeed(None)
604+        count = 0  # servers after the first two that receive requests
605+        for mutable in [False]:
606+            d.addCallback(lambda ign: self._set_up(mutable, "test_use_first_servers_to_reply"))
607+            def _incr_count():
608+                count += 1
609+            d.addCallback(lambda ign: self._notify(self.servers[2:], _incr_count))
610+            d.addCallback(lambda ign: self._hang(self.servers[2:]))
611+            def _recover():
612+                self._unhang(self.servers[2:])
613+            d.addCallback(lambda ign: reactor.callLater(5, _recover))
614+            d.addCallback(lambda ign: self._download_and_check())
615+            def _check_count(ign):
616+                self.failUnlessEqual(count, 1)
617+            d.addCallback(_check_count)
618+        return d
619}
620
621Context:
622
623[tests: stop being surprised that Nevow no longer prints out warnings when it tries to find its static files
624zooko@zooko.com**20100201041144
625 Ignore-this: 77b4ac383165d98dfe2a9008ce794742
626 Unless we are using a sufficiently new version of Nevow, in which case if it prints out warnings then this is a hard test failure. :-)
627]
628[cli: suppress DeprecationWarnings emitted from importing nevow and twisted. Fixes #859
629david-sarah@jacaranda.org**20100201004429
630 Ignore-this: 22d7216921cd5f04381c0194ed501bbe
631]
632[Improvements to test_unknownnode to cover invalid cap URIs with known prefixes
633david-sarah@jacaranda.org**20100130063908
634 Ignore-this: e1a298942c21207473e418ea5efd6276
635]
636[Fix invalid trailing commas in JSON example
637david-sarah@jacaranda.org**20100129201742
638 Ignore-this: d99e0a8ead4fafabf39a1daf11ec450b
639]
640[Improvements to test_hung_server, and fix for status updates in download.py
641david-sarah@jacaranda.org**20100130064303
642 Ignore-this: dd889c643afdcf0f86d55855aafda6ad
643]
644[immutable: fix bug in tests, change line-endings to unix style, add comment
645zooko@zooko.com**20100129184237
646 Ignore-this: f6bd875fe974c55c881e05eddf8d3436
647]
648[New tests for #928
649david-sarah@jacaranda.org**20100129123845
650 Ignore-this: 5c520f40141f0d9c000ffb05a4698995
651]
652[Eliminate 'foo if test else bar' syntax that isn't supported by Python 2.4
653david-sarah@jacaranda.org**20100129035210
654 Ignore-this: 70eafd487b4b6299beedd63b4a54a0c
655]
656[Fix example JSON in webapi.txt that cannot occur in practice
657david-sarah@jacaranda.org**20100129032742
658 Ignore-this: 361a1ba663d77169aeef93caef870097
659]
660[Add mutable field to t=json output for unknown nodes, when mutability is known
661david-sarah@jacaranda.org**20100129031424
662 Ignore-this: 1516d63559bdfeb6355485dff0f5c04e
663]
664[Show -IMM and -RO suffixes for types of immutable and read-only unknown nodes in directory listings
665david-sarah@jacaranda.org**20100128220800
666 Ignore-this: dc5c17c0a566398f88e4303c41321e66
667]
668[Fix inaccurate comment in test_mutant_dirnodes_are_omitted
669david-sarah@jacaranda.org**20100128202456
670 Ignore-this: 9fa17ed7feac9e4d084f1b2338c76fca
671]
672[immutable: download from the first servers which provide at least K buckets instead of waiting for all servers to reply
673zooko@zooko.com**20100127233417
674 Ignore-this: c855355a40d96827e1d0c469a8d8ab3f
675 This should put an end to the phenomenon I've been seeing that a single hung server can cause all downloads on a grid to hang.  Also it should speed up all downloads by (a) not-waiting for responses to queries that it doesn't need, and (b) downloading shares from the servers which answered the initial query the fastest.
676 Also, do not count how many buckets you've gotten when deciding whether the download has enough shares or not -- instead count how many buckets to *unique* shares that you've gotten.  This appears to improve a slightly weird behavior in the current download code in which receiving >= K different buckets all to the same sharenumber would make it think it had enough to download the file when in fact it hadn't.
677 This patch needs tests before it is actually ready for trunk.
678]
679[docs: update relnotes.txt for Tahoe-LAFS v1.6
680zooko@zooko.com**20100128171257
681 Ignore-this: 920df92152aead69ef861b9b2e8ff218
682]
683[Address comments by Kevan on 833 and add test for stripping spaces
684david-sarah@jacaranda.org**20100127230642
685 Ignore-this: de36aeaf4afb3ba05dbeb49a5e9a6b26
686]
687[Miscellaneous documentation, test, and code formatting tweaks.
688david-sarah@jacaranda.org**20100127070309
689 Ignore-this: 84ca7e4bb7c64221ae2c61144ef5edef
690]
691[Prevent mutable objects from being retrieved from an immutable directory, and associated forward-compatibility improvements.
692david-sarah@jacaranda.org**20100127064430
693 Ignore-this: 5ef6a3554cf6bef0bf0712cc7d6c0252
694]
695[test_runner: cleanup, refactor common code into a non-executable method
696Brian Warner <warner@lothar.com>**20100127224040
697 Ignore-this: 4cb4aada87777771f688edfd8129ffca
698 
699 Having both test_node() and test_client() (one of which calls the other) felt
700 confusing to me, so I changed it to have test_node(), test_client(), and a
701 common do_create() helper method.
702]
703[scripts/runner.py: simplify David-Sarah's clever grouped-commands usage trick
704Brian Warner <warner@lothar.com>**20100127223758
705 Ignore-this: 70877ebf06ae59f32960b0aa4ce1d1ae
706]
707[tahoe backup: skip all symlinks, with warning. Fixes #850, addresses #641.
708Brian Warner <warner@lothar.com>**20100127223517
709 Ignore-this: ab5cf05158d32a575ca8efc0f650033f
710]
711[NEWS: update with all recent user-visible changes
712Brian Warner <warner@lothar.com>**20100127222209
713 Ignore-this: 277d24568018bf4f3fb7736fda64eceb
714]
715["tahoe backup": fix --exclude-vcs docs to include Git
716Brian Warner <warner@lothar.com>**20100127201044
717 Ignore-this: 756a58dde21bdc65aa62b81803605b5
718]
719[docs: fix references to --no-storage, explanation of [storage] section
720Brian Warner <warner@lothar.com>**20100127200956
721 Ignore-this: f4be1763a585e1ac6299a4f1b94a59e0
722]
723[docs: further CREDITS level-ups for Nils, Kevan, David-Sarah
724zooko@zooko.com**20100126170021
725 Ignore-this: 1e513e85cf7b7abf57f056e6d7544b38
726]
727[Patch to accept t=set-children as well as t=set_children
728david-sarah@jacaranda.org**20100124030020
729 Ignore-this: 2c061f12af817cdf77feeeb64098ec3a
730]
731[Fix boodlegrid use of set_children
732david-sarah@jacaranda.org**20100126063414
733 Ignore-this: 3aa2d4836f76303b2bacecd09611f999
734]
735[ftpd: clearer error message if Twisted needs a patch (by Nils Durner)
736zooko@zooko.com**20100126143411
737 Ignore-this: 440e6831ae6da5135c1edd081c93871f
738]
739[Add 'docs/performance.txt', which (for the moment) describes mutable file performance issues
740Kevan Carstensen <kevan@isnotajoke.com>**20100115204500
741 Ignore-this: ade4e500217db2509aee35aacc8c5dbf
742]
743[docs: more CREDITS for François, Kevan, and David-Sarah
744zooko@zooko.com**20100126132133
745 Ignore-this: f37d4977c13066fcac088ba98a31b02e
746]
747[tahoe_backup.py: display warnings on errors instead of stopping the whole backup. Fix #729.
748francois@ctrlaltdel.ch**20100120094249
749 Ignore-this: 7006ea4b0910b6d29af6ab4a3997a8f9
750 
751 This patch displays a warning to the user in two cases:
752   
753   1. When special files like symlinks, fifos, devices, etc. are found in the
754      local source.
755   
756   2. If files or directories are not readables by the user running the 'tahoe
757      backup' command.
758 
759 In verbose mode, the number of skipped files and directories is printed at the
760 end of the backup.
761 
762 Exit status returned by 'tahoe backup':
763 
764   - 0 everything went fine
765   - 1 the backup failed
766   - 2 files were skipped during the backup
767 
768]
769[Warn about test failures due to setting FLOG* env vars
770david-sarah@jacaranda.org**20100124220629
771 Ignore-this: 1c25247ca0f0840390a1b7259a9f4a3c
772]
773[Message saying that we couldn't find bin/tahoe should say where we looked
774david-sarah@jacaranda.org**20100116204556
775 Ignore-this: 1068576fd59ea470f1e19196315d1bb
776]
777[Change running.html to describe 'tahoe run'
778david-sarah@jacaranda.org**20100112044409
779 Ignore-this: 23ad0114643ce31b56e19bb14e011e4f
780]
781[cli: merge the better version of David-Sarah's split-usage-and-help patch with the earlier version that I mistakenly committed
782zooko@zooko.com**20100126044559
783 Ignore-this: 284d188e13b7901013cbb650168e6447
784]
785[Split tahoe --help options into groups.
786david-sarah@jacaranda.org**20100112043935
787 Ignore-this: 610f9c41b00e6863e3cd047379733e3a
788]
789[cli: split usage strings into groups (patch by David-Sarah Hopwood)
790zooko@zooko.com**20100126043921
791 Ignore-this: 51928d266a7292b873f87f7d53c9a01e
792]
793[Add create-node CLI command, and make create-client equivalent to create-node --no-storage (fixes #760)
794david-sarah@jacaranda.org**20100116052055
795 Ignore-this: 47d08b18c69738685e13ff365738d5a
796]
797[Remove replace= parameter to mkdir-immutable and mkdir-with-children
798david-sarah@jacaranda.org**20100124224325
799 Ignore-this: 25207bcc946c0c43d9528718e76ba7b
800]
801[contrib/fuse/runtests.py: Fix #888, configure settings in tahoe.cfg and don't treat warnings as failure
802francois@ctrlaltdel.ch**20100109123010
803 Ignore-this: 2590d44044acd7dfa3690c416cae945c
804 
805 Fix a few bitrotten pieces in the FUSE test script.  It now configures tahoe
806 node settings by editing tahoe.cfg which is the new supported method.
807 
808 It alos tolerate warnings issued by the mount command, the cause of these
809 warnings is the same as in #876 (contrib/fuse/runtests.py doesn't tolerate
810 deprecations warnings).
811 
812]
813[Fix webapi t=mkdir with multpart/form-data, as on the Welcome page. Closes #919.
814Brian Warner <warner@lothar.com>**20100121065052
815 Ignore-this: 1f20ea0a0f1f6d6c1e8e14f193a92c87
816]
817[tahoe_add_alias.py: minor refactoring
818Brian Warner <warner@lothar.com>**20100115064220
819 Ignore-this: 29910e81ad11209c9e493d65fd2dab9b
820]
821[test_dirnode.py: reduce scope of a Client instance, suggested by Kevan.
822Brian Warner <warner@lothar.com>**20100115062713
823 Ignore-this: b35efd9e6027e43de6c6f509bfb4ccaa
824]
825[test_provisioning: STAN is not always a list. Fix by David-Sarah Hopwood.
826Brian Warner <warner@lothar.com>**20100115014632
827 Ignore-this: 9989de7f1e00907706d2b63153138219
828]
829[web/directory.py mkdir-immutable: hush pyflakes, add TODO for #903 behavior
830Brian Warner <warner@lothar.com>**20100114222804
831 Ignore-this: 717cd3b9a1c8aeee76938c9641db7356
832]
833[hush pyflakes-0.4.0 warnings: slightly less-trivial fixes. Closes #900.
834Brian Warner <warner@lothar.com>**20100114221719
835 Ignore-this: f774f4637e256ad55502659413a811a8
836 
837 This includes one fix (in test_web) which was testing the wrong thing.
838]
839[hush pyflakes-0.4.0 warnings: remove trivial unused variables. For #900.
840Brian Warner <warner@lothar.com>**20100114221529
841 Ignore-this: e96106c8f1a99fbf93306fbfe9a294cf
842]
843[tahoe add-alias/create-alias: don't corrupt non-newline-terminated alias
844Brian Warner <warner@lothar.com>**20100114210246
845 Ignore-this: 9c994792e53a85159d708760a9b1b000
846 file. Closes #741.
847]
848[change docs and --help to use "grid" instead of "virtual drive": closes #892.
849Brian Warner <warner@lothar.com>**20100114201119
850 Ignore-this: a20d4a4dcc4de4e3b404ff72d40fc29b
851 
852 Thanks to David-Sarah Hopwood for the patch.
853]
854[backupdb.txt: fix ST_CTIME reference
855Brian Warner <warner@lothar.com>**20100114194052
856 Ignore-this: 5a189c7a1181b07dd87f0a08ea31b6d3
857]
858[client.py: fix/update comments on KeyGenerator
859Brian Warner <warner@lothar.com>**20100113004226
860 Ignore-this: 2208adbb3fd6a911c9f44e814583cabd
861]
862[Clean up log.err calls, for one of the issues in #889.
863Brian Warner <warner@lothar.com>**20100112013343
864 Ignore-this: f58455ce15f1fda647c5fb25d234d2db
865 
866 allmydata.util.log.err() either takes a Failure as the first positional
867 argument, or takes no positional arguments and must be invoked in an
868 exception handler. Fixed its signature to match both foolscap.logging.log.err
869 and twisted.python.log.err . Included a brief unit test.
870]
871[tidy up DeadReferenceError handling, ignore them in add_lease calls
872Brian Warner <warner@lothar.com>**20100112000723
873 Ignore-this: 72f1444e826fd0b9db6d318f89603c38
874 
875 Stop checking separately for ConnectionDone/ConnectionLost, since those have
876 been folded into DeadReferenceError since foolscap-0.3.1 . Write
877 rrefutil.trap_deadref() in terms of rrefutil.trap_and_discard() to improve
878 code coverage.
879]
880[NEWS: improve "tahoe backup" notes, mention first-backup-after-upgrade duration
881Brian Warner <warner@lothar.com>**20100111190132
882 Ignore-this: 10347c590b3375964579ba6c2b0edb4f
883 
884 Thanks to Francois Deppierraz for the suggestion.
885]
886[test_repairer: add (commented-out) test_each_byte, to see exactly what the
887Brian Warner <warner@lothar.com>**20100110203552
888 Ignore-this: 8e84277d5304752edeff052b97821815
889 Verifier misses
890 
891 The results (described in #819) match our expectations: it misses corruption
892 in unused share fields and in most container fields (which are only visible
893 to the storage server, not the client). 1265 bytes of a 2753 byte
894 share (hosting a 56-byte file with an artifically small segment size) are
895 unused, mostly in the unused tail of the overallocated UEB space (765 bytes),
896 and the allocated-but-unwritten plaintext_hash_tree (480 bytes).
897]
898[repairer: fix some wrong offsets in the randomized verifier tests, debugged by Brian
899zooko@zooko.com**20100110203721
900 Ignore-this: 20604a609db8706555578612c1c12feb
901 fixes #819
902]
903[test_repairer: fix colliding basedir names, which caused test inconsistencies
904Brian Warner <warner@lothar.com>**20100110084619
905 Ignore-this: b1d56dd27e6ab99a7730f74ba10abd23
906]
907[repairer: add deterministic test for #819, mark as TODO
908zooko@zooko.com**20100110013619
909 Ignore-this: 4cb8bb30b25246de58ed2b96fa447d68
910]
911[contrib/fuse/runtests.py: Tolerate the tahoe CLI returning deprecation warnings
912francois@ctrlaltdel.ch**20100109175946
913 Ignore-this: 419c354d9f2f6eaec03deb9b83752aee
914 
915 Depending on the versions of external libraries such as Twisted of Foolscap,
916 the tahoe CLI can display deprecation warnings on stdout.  The tests should
917 not interpret those warnings as a failure if the node is in fact correctly
918 started.
919   
920 See http://allmydata.org/trac/tahoe/ticket/859 for an example of deprecation
921 warnings.
922 
923 fixes #876
924]
925[docs: CREDITS: add David-Sarah to the CREDITS file
926zooko@zooko.com**20100109060435
927 Ignore-this: 896062396ad85f9d2d4806762632f25a
928]
929[mutable/publish: don't loop() right away upon DeadReferenceError. Closes #877
930Brian Warner <warner@lothar.com>**20100102220841
931 Ignore-this: b200e707b3f13aa8251981362b8a3e61
932 
933 The bug was that a disconnected server could cause us to re-enter the initial
934 loop() call, sending multiple queries to a single server, provoking an
935 incorrect UCWE. To fix it, stall the loop() with an eventual.fireEventually()
936]
937[immutable/checker.py: oops, forgot some imports. Also hush pyflakes.
938Brian Warner <warner@lothar.com>**20091229233909
939 Ignore-this: 4d61bd3f8113015a4773fd4768176e51
940]
941[mutable repair: return successful=False when numshares<k (thus repair fails),
942Brian Warner <warner@lothar.com>**20091229233746
943 Ignore-this: d881c3275ff8c8bee42f6a80ca48441e
944 instead of weird errors. Closes #874 and #786.
945 
946 Previously, if the file had 0 shares, this would raise TypeError as it tried
947 to call download_version(None). If the file had some shares but fewer than
948 'k', it would incorrectly raise MustForceRepairError.
949 
950 Added get_successful() to the IRepairResults API, to give repair() a place to
951 report non-code-bug problems like this.
952]
953[node.py/interfaces.py: minor docs fixes
954Brian Warner <warner@lothar.com>**20091229230409
955 Ignore-this: c86ad6342ef0f95d50639b4f99cd4ddf
956]
957[NEWS: fix 1.4.1 announcement w.r.t. add-lease behavior in older releases
958Brian Warner <warner@lothar.com>**20091229230310
959 Ignore-this: bbbbb9c961f3bbcc6e5dbe0b1594822
960]
961[checker: don't let failures in add-lease affect checker results. Closes #875.
962Brian Warner <warner@lothar.com>**20091229230108
963 Ignore-this: ef1a367b93e4d01298c2b1e6ca59c492
964 
965 Mutable servermap updates and the immutable checker, when run with
966 add_lease=True, send both the do-you-have-block and add-lease commands in
967 parallel, to avoid an extra round trip time. Many older servers have problems
968 with add-lease and raise various exceptions, which don't generally matter.
969 The client-side code was catching+ignoring some of them, but unrecognized
970 exceptions were passed through to the DYHB code, concealing the DYHB results
971 from the checker, making it think the server had no shares.
972 
973 The fix is to separate the code paths. Both commands are sent at the same
974 time, but the errback path from add-lease is handled separately. Known
975 exceptions are ignored, the others (both unknown-remote and all-local) are
976 logged (log.WEIRD, which will trigger an Incident), but neither will affect
977 the DYHB results.
978 
979 The add-lease message is sent first, and we know that the server handles them
980 synchronously. So when the checker is done, we can be sure that all the
981 add-lease messages have been retired. This makes life easier for unit tests.
982]
983[test_cli: verify fix for "tahoe get" not creating empty file on error (#121)
984Brian Warner <warner@lothar.com>**20091227235444
985 Ignore-this: 6444d52413b68eb7c11bc3dfdc69c55f
986]
987[addendum to "Fix 'tahoe ls' on files (#771)"
988Brian Warner <warner@lothar.com>**20091227232149
989 Ignore-this: 6dd5e25f8072a3153ba200b7fdd49491
990 
991 tahoe_ls.py: tolerate missing metadata
992 web/filenode.py: minor cleanups
993 test_cli.py: test 'tahoe ls FILECAP'
994]
995[Fix 'tahoe ls' on files (#771). Patch adapted from Kevan Carstensen.
996Brian Warner <warner@lothar.com>**20091227225443
997 Ignore-this: 8bf8c7b1cd14ea4b0ebd453434f4fe07
998 
999 web/filenode.py: also serve edge metadata when using t=json on a
1000                  DIRCAP/childname object.
1001 tahoe_ls.py: list file objects as if we were listing one-entry directories.
1002              Show edge metadata if we have it, which will be true when doing
1003              'tahoe ls DIRCAP/filename' and false when doing 'tahoe ls
1004              FILECAP'
1005]
1006[tahoe_get: don't create the output file on error. Closes #121.
1007Brian Warner <warner@lothar.com>**20091227220404
1008 Ignore-this: 58d5e793a77ec6e87d9394ade074b926
1009]
1010[webapi: don't accept zero-length childnames during traversal. Closes #358, #676.
1011Brian Warner <warner@lothar.com>**20091227201043
1012 Ignore-this: a9119dec89e1c7741f2289b0cad6497b
1013 
1014 This forbids operations that would implicitly create a directory with a
1015 zero-length (empty string) name, like what you'd get if you did "tahoe put
1016 local /oops/blah" (#358) or "POST /uri/CAP//?t=mkdir" (#676). The error
1017 message is fairly friendly too.
1018 
1019 Also added code to "tahoe put" to catch this error beforehand and suggest the
1020 correct syntax (i.e. without the leading slash).
1021]
1022[CLI: send 'Accept:' header to ask for text/plain tracebacks. Closes #646.
1023Brian Warner <warner@lothar.com>**20091227195828
1024 Ignore-this: 44c258d4d4c7dac0ed58adb22f73331
1025 
1026 The webapi has been looking for an Accept header since 1.4.0, but it treats a
1027 missing header as equal to */* (to honor RFC2616). This change finally
1028 modifies our CLI tools to ask for "text/plain, application/octet-stream",
1029 which seems roughly correct (we either want a plain-text traceback or error
1030 message, or an uninterpreted chunk of binary data to save to disk). Some day
1031 we'll figure out how JSON fits into this scheme.
1032]
1033[Makefile: upload-tarballs: switch from xfer-client to flappclient, closes #350
1034Brian Warner <warner@lothar.com>**20091227163703
1035 Ignore-this: 3beeecdf2ad9c2438ab57f0e33dcb357
1036 
1037 I've also set up a new flappserver on source@allmydata.org to receive the
1038 tarballs. We still need to replace the gutsy buildslave (which is where the
1039 tarballs used to be generated+uploaded) and give it the new FURL.
1040]
1041[misc/ringsim.py: make it deterministic, more detail about grid-is-full behavior
1042Brian Warner <warner@lothar.com>**20091227024832
1043 Ignore-this: a691cc763fb2e98a4ce1767c36e8e73f
1044]
1045[misc/ringsim.py: tool to discuss #302
1046Brian Warner <warner@lothar.com>**20091226060339
1047 Ignore-this: fc171369b8f0d97afeeb8213e29d10ed
1048]
1049[contrib: fix fuse_impl_c to use new Python API
1050zooko@zooko.com**20100109174956
1051 Ignore-this: 51ca1ec7c2a92a0862e9b99e52542179
1052 original patch by Thomas Delaet, fixed by François, reviewed by Brian, committed by me
1053]
1054[docs/stats.txt: add TOC, notes about controlling gatherer's listening port
1055Brian Warner <warner@lothar.com>**20091224202133
1056 Ignore-this: 8eef63b0e18db5aa8249c2eafde02c05
1057 
1058 Thanks to Jody Harris for the suggestions.
1059]
1060[Add docs/stats.py, explaining Tahoe stats, the gatherer, and the munin plugins.
1061Brian Warner <warner@lothar.com>**20091223052400
1062 Ignore-this: 7c9eeb6e5644eceda98b59a67730ccd5
1063]
1064[more #859: avoid deprecation warning for unit tests too, hush pyflakes
1065Brian Warner <warner@lothar.com>**20091215000147
1066 Ignore-this: 193622e24d31077da825a11ed2325fd3
1067 
1068 * factor maybe-import-sha logic into util.hashutil
1069]
1070[docs: fix helper.txt to describe new config style
1071zooko@zooko.com**20091224223522
1072 Ignore-this: 102e7692dc414a4b466307f7d78601fe
1073]
1074[use hashlib module if available, thus avoiding a DeprecationWarning for importing the old sha module; fixes #859
1075zooko@zooko.com**20091214212703
1076 Ignore-this: 8d0f230a4bf8581dbc1b07389d76029c
1077]
1078[docs: reflow architecture.txt to 78-char lines
1079zooko@zooko.com**20091208232943
1080 Ignore-this: 88f55166415f15192e39407815141f77
1081]
1082[mutable/retrieve.py: stop reaching into private MutableFileNode attributes
1083Brian Warner <warner@lothar.com>**20091208172921
1084 Ignore-this: 61e548798c1105aed66a792bf26ceef7
1085]
1086[mutable/servermap.py: stop reaching into private MutableFileNode attributes
1087Brian Warner <warner@lothar.com>**20091208172608
1088 Ignore-this: b40a6b62f623f9285ad96fda139c2ef2
1089]
1090[mutable/servermap.py: oops, query N+e servers in MODE_WRITE, not k+e
1091Brian Warner <warner@lothar.com>**20091208171156
1092 Ignore-this: 3497f4ab70dae906759007c3cfa43bc
1093 
1094 under normal conditions, this wouldn't cause any problems, but if the shares
1095 are really sparse (perhaps because new servers were added), then
1096 file-modifies might stop looking too early and leave old shares in place
1097]
1098[control.py: fix speedtest: use download_best_version (not read) on mutable nodes
1099Brian Warner <warner@lothar.com>**20091207060512
1100 Ignore-this: 7125eabfe74837e05f9291dd6414f917
1101]
1102[FTP-and-SFTP.txt: fix ssh-keygen pointer
1103Brian Warner <warner@lothar.com>**20091207052803
1104 Ignore-this: bc2a70ee8c58ec314e79c1262ccb22f7
1105]
1106[remove MutableFileNode.download(), prefer download_best_version() instead
1107Brian Warner <warner@lothar.com>**20091201225438
1108 Ignore-this: 5733eb373a902063e09fd52cc858dec0
1109]
1110[Simplify immutable download API: use just filenode.read(consumer, offset, size)
1111Brian Warner <warner@lothar.com>**20091201225330
1112 Ignore-this: bdedfb488ac23738bf52ae6d4ab3a3fb
1113 
1114 * remove Downloader.download_to_data/download_to_filename/download_to_filehandle
1115 * remove download.Data/FileName/FileHandle targets
1116 * remove filenode.download/download_to_data/download_to_filename methods
1117 * leave Downloader.download (the whole Downloader will go away eventually)
1118 * add util.consumer.MemoryConsumer/download_to_data, for convenience
1119   (this is mostly used by unit tests, but it gets used by enough non-test
1120    code to warrant putting it in allmydata.util)
1121 * update tests
1122 * removes about 180 lines of code. Yay negative code days!
1123 
1124 Overall plan is to rewrite immutable/download.py and leave filenode.read() as
1125 the sole read-side API.
1126]
1127[server.py: undo my bogus 'correction' of David-Sarah's comment fix
1128Brian Warner <warner@lothar.com>**20091201024607
1129 Ignore-this: ff4bb58f6a9e045b900ac3a89d6f506a
1130 
1131 and move it to a better line
1132]
1133[Implement more coherent behavior when copying with dircaps/filecaps (closes #761). Patch by Kevan Carstensen.
1134"Brian Warner <warner@lothar.com>"**20091130211009]
1135[storage.py: update comment
1136"Brian Warner <warner@lothar.com>"**20091130195913]
1137[storage server: detect disk space usage on Windows too (fixes #637)
1138david-sarah@jacaranda.org**20091121055644
1139 Ignore-this: 20fb30498174ce997befac7701fab056
1140]
1141[make status of finished operations consistently "Finished"
1142david-sarah@jacaranda.org**20091121061543
1143 Ignore-this: 97d483e8536ccfc2934549ceff7055a3
1144]
1145[docs: update the about.html a little
1146zooko@zooko.com**20091208212737
1147 Ignore-this: 3fe2d9653c6de0727d3e82bd70f2a8ed
1148]
1149[setup: ignore _darcs in the "test-clean" test and make the "clean" step remove all .egg's in the root dir
1150zooko@zooko.com**20091206184835
1151 Ignore-this: 6066bd160f0db36d7bf60aba405558d2
1152]
1153[NEWS: update with all user-visible changes since the last release
1154Brian Warner <warner@lothar.com>**20091127224217
1155 Ignore-this: 741da6cd928e939fb6d21a61ea3daf0b
1156]
1157[update "tahoe backup" docs, and webapi.txt's mkdir-with-children
1158Brian Warner <warner@lothar.com>**20091127055900
1159 Ignore-this: defac1fb9a2335b0af3ef9dbbcc67b7e
1160]
1161[Add dirnodes to backupdb and "tahoe backup", closes #606.
1162Brian Warner <warner@lothar.com>**20091126234257
1163 Ignore-this: fa88796fcad1763c6a2bf81f56103223
1164 
1165 * backups now share dirnodes with any previous backup, in any location,
1166   so renames and moves are handled very efficiently
1167 * "tahoe backup" no longer bothers reading the previous snapshot
1168 * if you switch grids, you should delete ~/.tahoe/private/backupdb.sqlite,
1169   to force new uploads of all files and directories
1170]
1171[webapi: fix t=check for DIR2-LIT (i.e. empty immutable directories)
1172Brian Warner <warner@lothar.com>**20091126232731
1173 Ignore-this: 8513c890525c69c1eca0e80d53a231f8
1174]
1175[PipelineError: fix str() on python2.4 . Closes #842.
1176Brian Warner <warner@lothar.com>**20091124212512
1177 Ignore-this: e62c92ea9ede2ab7d11fe63f43b9c942
1178]
1179[test_uri.py: s/NewDirnode/Dirnode/ , now that they aren't "new" anymore
1180Brian Warner <warner@lothar.com>**20091120075553
1181 Ignore-this: 61c8ef5e45a9d966873a610d8349b830
1182]
1183[interface name cleanups: IFileNode, IImmutableFileNode, IMutableFileNode
1184Brian Warner <warner@lothar.com>**20091120075255
1185 Ignore-this: e3d193c229e2463e1d0b0c92306de27f
1186 
1187 The proper hierarchy is:
1188  IFilesystemNode
1189  +IFileNode
1190  ++IMutableFileNode
1191  ++IImmutableFileNode
1192  +IDirectoryNode
1193 
1194 Also expand test_client.py (NodeMaker) to hit all IFilesystemNode types.
1195]
1196[class name cleanups: s/FileNode/ImmutableFileNode/
1197Brian Warner <warner@lothar.com>**20091120072239
1198 Ignore-this: 4b3218f2d0e585c62827e14ad8ed8ac1
1199 
1200 also fix test/bench_dirnode.py for recent dirnode changes
1201]
1202[Use DIR-IMM and t=mkdir-immutable for "tahoe backup", for #828
1203Brian Warner <warner@lothar.com>**20091118192813
1204 Ignore-this: a4720529c9bc6bc8b22a3d3265925491
1205]
1206[web/directory.py: use "DIR-IMM" to describe immutable directories, not DIR-RO
1207Brian Warner <warner@lothar.com>**20091118191832
1208 Ignore-this: aceafd6ab4bf1cc0c2a719ef7319ac03
1209]
1210[web/info.py: hush pyflakes
1211Brian Warner <warner@lothar.com>**20091118191736
1212 Ignore-this: edc5f128a2b8095fb20686a75747c8
1213]
1214[make get_size/get_current_size consistent for all IFilesystemNode classes
1215Brian Warner <warner@lothar.com>**20091118191624
1216 Ignore-this: bd3449cf96e4827abaaf962672c1665a
1217 
1218 * stop caching most_recent_size in dirnode, rely upon backing filenode for it
1219 * start caching most_recent_size in MutableFileNode
1220 * return None when you don't know, not "?"
1221 * only render None as "?" in the web "more info" page
1222 * add get_size/get_current_size to UnknownNode
1223]
1224[ImmutableDirectoryURIVerifier: fix verifycap handling
1225Brian Warner <warner@lothar.com>**20091118164238
1226 Ignore-this: 6bba5c717b54352262eabca6e805d590
1227]
1228[Add t=mkdir-immutable to the webapi. Closes #607.
1229Brian Warner <warner@lothar.com>**20091118070900
1230 Ignore-this: 311e5fab9a5f28b9e8a28d3d08f3c0d
1231 
1232 * change t=mkdir-with-children to not use multipart/form encoding. Instead,
1233   the request body is all JSON. t=mkdir-immutable uses this format too.
1234 * make nodemaker.create_immutable_dirnode() get convergence from SecretHolder,
1235   but let callers override it
1236 * raise NotDeepImmutableError instead of using assert()
1237 * add mutable= argument to DirectoryNode.create_subdirectory(), default True
1238]
1239[move convergence secret into SecretHolder, next to lease secret
1240Brian Warner <warner@lothar.com>**20091118015444
1241 Ignore-this: 312f85978a339f2d04deb5bcb8f511bc
1242]
1243[nodemaker: implement immutable directories (internal interface), for #607
1244Brian Warner <warner@lothar.com>**20091112002233
1245 Ignore-this: d09fccf41813fdf7e0db177ed9e5e130
1246 
1247 * nodemaker.create_from_cap() now handles DIR2-CHK and DIR2-LIT
1248 * client.create_immutable_dirnode() is used to create them
1249 * no webapi yet
1250]
1251[stop using IURI()/etc as an adapter
1252Brian Warner <warner@lothar.com>**20091111224542
1253 Ignore-this: 9611da7ea6a4696de2a3b8c08776e6e0
1254]
1255[clean up uri-vs-cap terminology, emphasize cap instances instead of URI strings
1256Brian Warner <warner@lothar.com>**20091111222619
1257 Ignore-this: 93626385f6e7f039ada71f54feefe267
1258 
1259  * "cap" means a python instance which encapsulates a filecap/dircap (uri.py)
1260  * "uri" means a string with a "URI:" prefix
1261  * FileNode instances are created with (and retain) a cap instance, and
1262    generate uri strings on demand
1263  * .get_cap/get_readcap/get_verifycap/get_repaircap return cap instances
1264  * .get_uri/get_readonly_uri return uri strings
1265 
1266 * add filenode.download_to_filename() for control.py, should find a better way
1267 * use MutableFileNode.init_from_cap, not .init_from_uri
1268 * directory URI instances: use get_filenode_cap, not get_filenode_uri
1269 * update/cleanup bench_dirnode.py to match, add Makefile target to run it
1270]
1271[add parser for immutable directory caps: DIR2-CHK, DIR2-LIT, DIR2-CHK-Verifier
1272Brian Warner <warner@lothar.com>**20091104181351
1273 Ignore-this: 854398cc7a75bada57fa97c367b67518
1274]
1275[wui: s/TahoeLAFS/Tahoe-LAFS/
1276zooko@zooko.com**20091029035050
1277 Ignore-this: 901e64cd862e492ed3132bd298583c26
1278]
1279[docs: remove obsolete doc file "codemap.txt"
1280zooko@zooko.com**20091113163033
1281 Ignore-this: 16bc21a1835546e71d1b344c06c61ebb
1282 I started to update this to reflect the current codebase, but then I thought (a) nobody seemed to notice that it hasn't been updated since December 2007, and (b) it will just bit-rot again, so I'm removing it.
1283]
1284[dirnode.pack_children(): add deep_immutable= argument
1285Brian Warner <warner@lothar.com>**20091026162809
1286 Ignore-this: d5a2371e47662c4bc6eff273e8181b00
1287 
1288 This will be used by DIR2:CHK to enforce the deep-immutability requirement.
1289]
1290[webapi: use t=mkdir-with-children instead of a children= arg to t=mkdir .
1291Brian Warner <warner@lothar.com>**20091026011321
1292 Ignore-this: 769cab30b6ab50db95000b6c5a524916
1293 
1294 This is safer: in the earlier API, an old webapi server would silently ignore
1295 the initial children, and clients trying to set them would have to fetch the
1296 newly-created directory to discover the incompatibility. In the new API,
1297 clients using t=mkdir-with-children against an old webapi server will get a
1298 clear error.
1299]
1300[tests: bump up the timeout on test_repairer to see if 120 seconds was too short for François's ARM box to do the test even when it was doing it right.
1301zooko@zooko.com**20091027224800
1302 Ignore-this: 95e93dc2e018b9948253c2045d506f56
1303]
1304[nodemaker.create_new_mutable_directory: pack_children() in initial_contents=
1305Brian Warner <warner@lothar.com>**20091020005118
1306 Ignore-this: bd43c4eefe06fd32b7492bcb0a55d07e
1307 instead of creating an empty file and then adding the children later.
1308 
1309 This should speed up mkdir(initial_children) considerably, removing two
1310 roundtrips and an entire read-modify-write cycle, probably bringing it down
1311 to a single roundtrip. A quick test (against the volunteergrid) suggests a
1312 30% speedup.
1313 
1314 test_dirnode: add new tests to enforce the restrictions that interfaces.py
1315 claims for create_new_mutable_directory(): no UnknownNodes, metadata dicts
1316]
1317[test_dirnode.py: add tests of initial_children= args to client.create_dirnode
1318Brian Warner <warner@lothar.com>**20091017194159
1319 Ignore-this: 2e2da28323a4d5d815466387914abc1b
1320 and nodemaker.create_new_mutable_directory
1321]
1322[update many dirnode interfaces to accept dict-of-nodes instead of dict-of-caps
1323Brian Warner <warner@lothar.com>**20091017192829
1324 Ignore-this: b35472285143862a856bf4b361d692f0
1325 
1326 interfaces.py: define INodeMaker, document argument values, change
1327                create_new_mutable_directory() to take dict-of-nodes. Change
1328                dirnode.set_nodes() and dirnode.create_subdirectory() too.
1329 nodemaker.py: use INodeMaker, update create_new_mutable_directory()
1330 client.py: have create_dirnode() delegate initial_children= to nodemaker
1331 dirnode.py (Adder): take dict-of-nodes instead of list-of-nodes, which
1332                     updates set_nodes() and create_subdirectory()
1333 web/common.py (convert_initial_children_json): create dict-of-nodes
1334 web/directory.py: same
1335 web/unlinked.py: same
1336 test_dirnode.py: update tests to match
1337]
1338[dirnode.py: move pack_children() out to a function, for eventual use by others
1339Brian Warner <warner@lothar.com>**20091017180707
1340 Ignore-this: 6a823fb61f2c180fd38d6742d3196a7a
1341]
1342[move dirnode.CachingDict to dictutil.AuxValueDict, generalize method names,
1343Brian Warner <warner@lothar.com>**20091017180005
1344 Ignore-this: b086933cf429df0fcea16a308d2640dd
1345 improve tests. Let dirnode _pack_children accept either dict or AuxValueDict.
1346]
1347[test/common.py: update FakeMutableFileNode to new contents= callable scheme
1348Brian Warner <warner@lothar.com>**20091013052154
1349 Ignore-this: 62f00a76454a2190d1c8641c5993632f
1350]
1351[The initial_children= argument to nodemaker.create_new_mutable_directory is
1352Brian Warner <warner@lothar.com>**20091013031922
1353 Ignore-this: 72e45317c21f9eb9ec3bd79bd4311f48
1354 now enabled.
1355]
1356[client.create_mutable_file(contents=) now accepts a callable, which is
1357Brian Warner <warner@lothar.com>**20091013031232
1358 Ignore-this: 3c89d2f50c1e652b83f20bd3f4f27c4b
1359 invoked with the new MutableFileNode and is supposed to return the initial
1360 contents. This can be used by e.g. a new dirnode which needs the filenode's
1361 writekey to encrypt its initial children.
1362 
1363 create_mutable_file() still accepts a bytestring too, or None for an empty
1364 file.
1365]
1366[webapi: t=mkdir now accepts initial children, using the same JSON that t=json
1367Brian Warner <warner@lothar.com>**20091013023444
1368 Ignore-this: 574a46ed46af4251abf8c9580fd31ef7
1369 emits.
1370 
1371 client.create_dirnode(initial_children=) now works.
1372]
1373[replace dirnode.create_empty_directory() with create_subdirectory(), which
1374Brian Warner <warner@lothar.com>**20091013021520
1375 Ignore-this: 6b57cb51bcfcc6058d0df569fdc8a9cf
1376 takes an initial_children= argument
1377]
1378[dirnode.set_children: change return value: fire with self instead of None
1379Brian Warner <warner@lothar.com>**20091013015026
1380 Ignore-this: f1d14e67e084e4b2a4e25fa849b0e753
1381]
1382[dirnode.set_nodes: change return value: fire with self instead of None
1383Brian Warner <warner@lothar.com>**20091013014546
1384 Ignore-this: b75b3829fb53f7399693f1c1a39aacae
1385]
1386[dirnode.set_children: take a dict, not a list
1387Brian Warner <warner@lothar.com>**20091013002440
1388 Ignore-this: 540ce72ce2727ee053afaae1ff124e21
1389]
1390[dirnode.set_uri/set_children: change signature to take writecap+readcap
1391Brian Warner <warner@lothar.com>**20091012235126
1392 Ignore-this: 5df617b2d379a51c79148a857e6026b1
1393 instead of a single cap. The webapi t=set_children call benefits too.
1394]
1395[replace Client.create_empty_dirnode() with create_dirnode(), in anticipation
1396Brian Warner <warner@lothar.com>**20091012224506
1397 Ignore-this: cbdaa4266ecb3c6496ffceab4f95709d
1398 of adding initial_children= argument.
1399 
1400 Includes stubbed-out initial_children= support.
1401]
1402[test_web.py: use a less-fake client, making test harness smaller
1403Brian Warner <warner@lothar.com>**20091012222808
1404 Ignore-this: 29e95147f8c94282885c65b411d100bb
1405]
1406[webapi.txt: document t=set_children, other small edits
1407Brian Warner <warner@lothar.com>**20091009200446
1408 Ignore-this: 4d7e76b04a7b8eaa0a981879f778ea5d
1409]
1410[Verifier: check the full cryptext-hash tree on each share. Removed .todos
1411Brian Warner <warner@lothar.com>**20091005221849
1412 Ignore-this: 6fb039c5584812017d91725e687323a5
1413 from the last few test_repairer tests that were waiting on this.
1414]
1415[Verifier: check the full block-hash-tree on each share
1416Brian Warner <warner@lothar.com>**20091005214844
1417 Ignore-this: 3f7ccf6d253f32340f1bf1da27803eee
1418 
1419 Removed the .todo from two test_repairer tests that check this. The only
1420 remaining .todos are on the three crypttext-hash-tree tests.
1421]
1422[Verifier: check the full share-hash chain on each share
1423Brian Warner <warner@lothar.com>**20091005213443
1424 Ignore-this: 3d30111904158bec06a4eac22fd39d17
1425 
1426 Removed the .todo from two test_repairer tests that check this.
1427]
1428[test_repairer: rename Verifier test cases to be more precise and less verbose
1429Brian Warner <warner@lothar.com>**20091005201115
1430 Ignore-this: 64be7094e33338c7c2aea9387e138771
1431]
1432[immutable/checker.py: rearrange code a little bit, make it easier to follow
1433Brian Warner <warner@lothar.com>**20091005200252
1434 Ignore-this: 91cc303fab66faf717433a709f785fb5
1435]
1436[test/common.py: wrap docstrings to 80cols so I can read them more easily
1437Brian Warner <warner@lothar.com>**20091005200143
1438 Ignore-this: b180a3a0235cbe309c87bd5e873cbbb3
1439]
1440[immutable/download.py: wrap to 80cols, no functional changes
1441Brian Warner <warner@lothar.com>**20091005192542
1442 Ignore-this: 6b05fe3dc6d78832323e708b9e6a1fe
1443]
1444[CHK-hashes.svg: cross out plaintext hashes, since we don't include
1445Brian Warner <warner@lothar.com>**20091005010803
1446 Ignore-this: bea2e953b65ec7359363aa20de8cb603
1447 them (until we finish #453)
1448]
1449[docs: a few licensing clarifications requested by Ubuntu
1450zooko@zooko.com**20090927033226
1451 Ignore-this: 749fc8c9aeb6dc643669854a3e81baa7
1452]
1453[setup: remove binary WinFUSE modules
1454zooko@zooko.com**20090924211436
1455 Ignore-this: 8aefc571d2ae22b9405fc650f2c2062
1456 I would prefer to have just source code, or indications of what 3rd-party packages are required, under revision control, and have the build process generate o
1457 r acquire the binaries as needed.  Also, having these in our release tarballs is interfering with getting Tahoe-LAFS uploaded into Ubuntu Karmic.  (Technicall
1458 y, they would accept binary modules as long as they came with the accompanying source so that they could satisfy their obligations under GPL2+ and TGPPL1+, bu
1459 t it is easier for now to remove the binaries from the source tree.)
1460 In this case, the binaries are from the tahoe-w32-client project: http://allmydata.org/trac/tahoe-w32-client , from which you can also get the source.
1461]
1462[setup: remove binary _fusemodule.so 's
1463zooko@zooko.com**20090924211130
1464 Ignore-this: 74487bbe27d280762ac5dd5f51e24186
1465 I would prefer to have just source code, or indications of what 3rd-party packages are required, under revision control, and have the build process generate or acquire the binaries as needed.  Also, having these in our release tarballs is interfering with getting Tahoe-LAFS uploaded into Ubuntu Karmic.  (Technically, they would accept binary modules as long as they came with the accompanying source so that they could satisfy their obligations under GPL2+ and TGPPL1+, but it is easier for now to remove the binaries from the source tree.)
1466 In this case, these modules come from the MacFUSE project: http://code.google.com/p/macfuse/
1467]
1468[doc: add a copy of LGPL2 for documentation purposes for ubuntu
1469zooko@zooko.com**20090924054218
1470 Ignore-this: 6a073b48678a7c84dc4fbcef9292ab5b
1471]
1472[setup: remove a convenience copy of figleaf, to ease inclusion into Ubuntu Karmic Koala
1473zooko@zooko.com**20090924053215
1474 Ignore-this: a0b0c990d6e2ee65c53a24391365ac8d
1475 We need to carefully document the licence of figleaf in order to get Tahoe-LAFS into Ubuntu Karmic Koala.  However, figleaf isn't really a part of Tahoe-LAFS per se -- this is just a "convenience copy" of a development tool.  The quickest way to make Tahoe-LAFS acceptable for Karmic then, is to remove figleaf from the Tahoe-LAFS tarball itself.  People who want to run figleaf on Tahoe-LAFS (as everyone should want) can install figleaf themselves.  I haven't tested this -- there may be incompatibilities between upstream figleaf and the copy that we had here...
1476]
1477[setup: shebang for misc/build-deb.py to fail quickly
1478zooko@zooko.com**20090819135626
1479 Ignore-this: 5a1b893234d2d0bb7b7346e84b0a6b4d
1480 Without this patch, when I ran "chmod +x ./misc/build-deb.py && ./misc/build-deb.py" then it hung indefinitely.  (I wonder what it was doing.)
1481]
1482[docs: Shawn Willden grants permission for his contributions under GPL2+|TGPPL1+
1483zooko@zooko.com**20090921164651
1484 Ignore-this: ef1912010d07ff2ffd9678e7abfd0d57
1485]
1486[docs: Csaba Henk granted permission to license fuse.py under the same terms as Tahoe-LAFS itself
1487zooko@zooko.com**20090921154659
1488 Ignore-this: c61ba48dcb7206a89a57ca18a0450c53
1489]
1490[setup: mark setup.py as having utf-8 encoding in it
1491zooko@zooko.com**20090920180343
1492 Ignore-this: 9d3850733700a44ba7291e9c5e36bb91
1493]
1494[doc: licensing cleanups
1495zooko@zooko.com**20090920171631
1496 Ignore-this: 7654f2854bf3c13e6f4d4597633a6630
1497 Use nice utf-8 © instead of "(c)". Remove licensing statements on utility modules that have been assigned to allmydata.com by their original authors. (Nattraverso was not assigned to allmydata.com -- it was LGPL'ed -- but I checked and src/allmydata/util/iputil.py was completely rewritten and doesn't contain any line of code from nattraverso.)  Add notes to misc/debian/copyright about licensing on files that aren't just allmydata.com-licensed.
1498]
1499[build-deb.py: run darcsver early, otherwise we get the wrong version later on
1500Brian Warner <warner@lothar.com>**20090918033620
1501 Ignore-this: 6635c5b85e84f8aed0d8390490c5392a
1502]
1503[new approach for debian packaging, sharing pieces across distributions. Still experimental, still only works for sid.
1504warner@lothar.com**20090818190527
1505 Ignore-this: a75eb63db9106b3269badbfcdd7f5ce1
1506]
1507[new experimental deb-packaging rules. Only works for sid so far.
1508Brian Warner <warner@lothar.com>**20090818014052
1509 Ignore-this: 3a26ad188668098f8f3cc10a7c0c2f27
1510]
1511[setup.py: read _version.py and pass to setup(version=), so more commands work
1512Brian Warner <warner@lothar.com>**20090818010057
1513 Ignore-this: b290eb50216938e19f72db211f82147e
1514 like "setup.py --version" and "setup.py --fullname"
1515]
1516[test/check_speed.py: fix shbang line
1517Brian Warner <warner@lothar.com>**20090818005948
1518 Ignore-this: 7f3a37caf349c4c4de704d0feb561f8d
1519]
1520[de-Service-ify Helper, pass in storage_broker and secret_holder directly.
1521Brian Warner <warner@lothar.com>**20090815201737
1522 Ignore-this: 86b8ac0f90f77a1036cd604dd1304d8b
1523 This makes it more obvious that the Helper currently generates leases with
1524 the Helper's own secrets, rather than getting values from the client, which
1525 is arguably a bug that will likely be resolved with the Accounting project.
1526]
1527[immutable.Downloader: pass StorageBroker to constructor, stop being a Service
1528Brian Warner <warner@lothar.com>**20090815192543
1529 Ignore-this: af5ab12dbf75377640a670c689838479
1530 child of the client, access with client.downloader instead of
1531 client.getServiceNamed("downloader"). The single "Downloader" instance is
1532 scheduled for demolition anyways, to be replaced by individual
1533 filenode.download calls.
1534]
1535[tests: double the timeout on test_runner.RunNode.test_introducer since feisty hit a timeout
1536zooko@zooko.com**20090815160512
1537 Ignore-this: ca7358bce4bdabe8eea75dedc39c0e67
1538 I'm not sure if this is an actual timing issue (feisty is running on an overloaded VM if I recall correctly), or it there is a deeper bug.
1539]
1540[stop making History be a Service, it wasn't necessary
1541Brian Warner <warner@lothar.com>**20090815114415
1542 Ignore-this: b60449231557f1934a751c7effa93cfe
1543]
1544[Overhaul IFilesystemNode handling, to simplify tests and use POLA internally.
1545Brian Warner <warner@lothar.com>**20090815112846
1546 Ignore-this: 1db1b9c149a60a310228aba04c5c8e5f
1547 
1548 * stop using IURI as an adapter
1549 * pass cap strings around instead of URI instances
1550 * move filenode/dirnode creation duties from Client to new NodeMaker class
1551 * move other Client duties to KeyGenerator, SecretHolder, History classes
1552 * stop passing Client reference to dirnode/filenode constructors
1553   - pass less-powerful references instead, like StorageBroker or Uploader
1554 * always create DirectoryNodes by wrapping a filenode (mutable for now)
1555 * remove some specialized mock classes from unit tests
1556 
1557 Detailed list of changes (done one at a time, then merged together)
1558 
1559 always pass a string to create_node_from_uri(), not an IURI instance
1560 always pass a string to IFilesystemNode constructors, not an IURI instance
1561 stop using IURI() as an adapter, switch on cap prefix in create_node_from_uri()
1562 client.py: move SecretHolder code out to a separate class
1563 test_web.py: hush pyflakes
1564 client.py: move NodeMaker functionality out into a separate object
1565 LiteralFileNode: stop storing a Client reference
1566 immutable Checker: remove Client reference, it only needs a SecretHolder
1567 immutable Upload: remove Client reference, leave SecretHolder and StorageBroker
1568 immutable Repairer: replace Client reference with StorageBroker and SecretHolder
1569 immutable FileNode: remove Client reference
1570 mutable.Publish: stop passing Client
1571 mutable.ServermapUpdater: get StorageBroker in constructor, not by peeking into Client reference
1572 MutableChecker: reference StorageBroker and History directly, not through Client
1573 mutable.FileNode: removed unused indirection to checker classes
1574 mutable.FileNode: remove Client reference
1575 client.py: move RSA key generation into a separate class, so it can be passed to the nodemaker
1576 move create_mutable_file() into NodeMaker
1577 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.
1578 test_mutable.py: clean up basedir names
1579 client.py: move create_empty_dirnode() into NodeMaker
1580 dirnode.py: get rid of DirectoryNode.create
1581 remove DirectoryNode.init_from_uri, refactor NodeMaker for customization, simplify test_web's mock Client to match
1582 stop passing Client to DirectoryNode, make DirectoryNode.create_with_mutablefile the normal DirectoryNode constructor, start removing client from NodeMaker
1583 remove Client from NodeMaker
1584 move helper status into History, pass History to web.Status instead of Client
1585 test_mutable.py: fix minor typo
1586]
1587[setup: remove bundled version of darcsver-1.2.1
1588zooko@zooko.com**20090816233432
1589 Ignore-this: 5357f26d2803db2d39159125dddb963a
1590 That version of darcsver emits a scary error message when the darcs executable or the _darcs subdirectory is not found.
1591 This error is hidden (unless the --loud option is passed) in darcsver >= 1.3.1.
1592 Fixes #788.
1593]
1594[docs: edits for docs/running.html from Sam Mason
1595zooko@zooko.com**20090809201416
1596 Ignore-this: 2207e80449943ebd4ed50cea57c43143
1597]
1598[docs: install.html: instruct Debian users to use this document and not to go find the DownloadDebianPackages page, ignore the warning at the top of it, and try it
1599zooko@zooko.com**20090804123840
1600 Ignore-this: 49da654f19d377ffc5a1eff0c820e026
1601 http://allmydata.org/pipermail/tahoe-dev/2009-August/002507.html
1602]
1603[docs: about.html: fix English usage noticed by Amber
1604zooko@zooko.com**20090802050533
1605 Ignore-this: 89965c4650f9bd100a615c401181a956
1606]
1607[docs: fix mis-spelled word in about.html
1608zooko@zooko.com**20090802050320
1609 Ignore-this: fdfd0397bc7cef9edfde425dddeb67e5
1610]
1611[docs: relnotes.txt: reflow to 63 chars wide because google groups and some web forms seem to wrap to that
1612zooko@zooko.com**20090802135016
1613 Ignore-this: 53b1493a0491bc30fb2935fad283caeb
1614]
1615[TAG allmydata-tahoe-1.5.0
1616zooko@zooko.com**20090802031303
1617 Ignore-this: 94e5558e7225c39a86aae666ea00f166
1618]
1619Patch bundle hash:
16204dc8dfbdffbd77ca7af3ae4049fb14edd698ea33