Ticket #694: 694.diff

File 694.diff, 15.5 KB (added by kevan, at 2009-06-20T02:53:41Z)
Line 
1Fri Jun 19 18:06:03 PDT 2009  kevan@isnotajoke.com
2  * publish.py
3
4Fri Jun 19 18:08:57 PDT 2009  kevan@isnotajoke.com
5  * tests.diff
6
7New patches:
8
9[publish.py
10kevan@isnotajoke.com**20090620010603
11 Ignore-this: 3b58bfbea152a9261ca51c9be379984a
12] {
13hunk ./src/allmydata/mutable/publish.py 93
14     To make the initial publish, set servermap to None.
15     """
16 
17-    # we limit the segment size as usual to constrain our memory footprint.
18-    # The max segsize is higher for mutable files, because we want to support
19-    # dirnodes with up to 10k children, and each child uses about 330 bytes.
20-    # If you actually put that much into a directory you'll be using a
21-    # footprint of around 14MB, which is higher than we'd like, but it is
22-    # more important right now to support large directories than to make
23-    # memory usage small when you use them. Once we implement MDMF (with
24-    # multiple segments), we will drop this back down, probably to 128KiB.
25-    MAX_SEGMENT_SIZE = 3500000
26-
27     def __init__(self, filenode, servermap):
28         self._node = filenode
29         self._servermap = servermap
30hunk ./src/allmydata/mutable/publish.py 136
31         # 5: when enough responses are back, we're done
32 
33         self.log("starting publish, datalen is %s" % len(newdata))
34-        if len(newdata) > self.MAX_SEGMENT_SIZE:
35-            raise FileTooLargeError("SDMF is limited to one segment, and "
36-                                    "%d > %d" % (len(newdata),
37-                                                 self.MAX_SEGMENT_SIZE))
38         self._status.set_size(len(newdata))
39         self._status.set_status("Started")
40         self._started = time.time()
41hunk ./src/allmydata/mutable/publish.py 251
42         return self.done_deferred
43 
44     def setup_encoding_parameters(self):
45-        segment_size = min(self.MAX_SEGMENT_SIZE, len(self.newdata))
46+        segment_size = len(self.newdata)
47         # this must be a multiple of self.required_shares
48         segment_size = mathutil.next_multiple(segment_size,
49                                               self.required_shares)
50}
51[tests.diff
52kevan@isnotajoke.com**20090620010857
53 Ignore-this: e078c91d24a7da8ff2fcc0ca258fd074
54] {
55hunk ./src/allmydata/test/test_mutable.py 268
56     return res
57 
58 class Filenode(unittest.TestCase, testutil.ShouldFailMixin):
59+    # this used to be in Publish, but we removed it there. Some of the
60+    # tests in here still use it, though, so here it is.
61+    OLD_MAX_SEGMENT_SIZE = 3500000
62     def setUp(self):
63         self.client = FakeClient()
64 
65hunk ./src/allmydata/test/test_mutable.py 361
66         return d
67 
68     def test_create_with_too_large_contents(self):
69-        BIG = "a" * (Publish.MAX_SEGMENT_SIZE+1)
70-        d = self.shouldFail(FileTooLargeError, "too_large",
71-                            "SDMF is limited to one segment, and %d > %d" %
72-                            (len(BIG), Publish.MAX_SEGMENT_SIZE),
73-                            self.client.create_mutable_file, BIG)
74-        d.addCallback(lambda res: self.client.create_mutable_file("small"))
75+        BIG = "a" * (self.OLD_MAX_SEGMENT_SIZE + 1)
76+        d = self.client.create_mutable_file(BIG)
77         def _created(n):
78hunk ./src/allmydata/test/test_mutable.py 364
79-            return self.shouldFail(FileTooLargeError, "too_large_2",
80-                                   "SDMF is limited to one segment, and %d > %d" %
81-                                   (len(BIG), Publish.MAX_SEGMENT_SIZE),
82-                                   n.overwrite, BIG)
83+            d = n.overwrite(BIG)
84+            return d
85         d.addCallback(_created)
86         return d
87 
88hunk ./src/allmydata/test/test_mutable.py 386
89         def _error_modifier(old_contents, servermap, first_time):
90             raise ValueError("oops")
91         def _toobig_modifier(old_contents, servermap, first_time):
92-            return "b" * (Publish.MAX_SEGMENT_SIZE+1)
93+            return "b" * (self.OLD_MAX_SEGMENT_SIZE+1)
94         calls = []
95         def _ucw_error_modifier(old_contents, servermap, first_time):
96             # simulate an UncoordinatedWriteError once
97hunk ./src/allmydata/test/test_mutable.py 426
98             d.addCallback(lambda res: self.failUnlessEqual(res, "line1line2"))
99             d.addCallback(lambda res: self.failUnlessCurrentSeqnumIs(n, 2, "err"))
100 
101-            d.addCallback(lambda res:
102-                          self.shouldFail(FileTooLargeError, "toobig_modifier",
103-                                          "SDMF is limited to one segment",
104-                                          n.modify, _toobig_modifier))
105+
106             d.addCallback(lambda res: n.download_best_version())
107             d.addCallback(lambda res: self.failUnlessEqual(res, "line1line2"))
108             d.addCallback(lambda res: self.failUnlessCurrentSeqnumIs(n, 2, "big"))
109hunk ./src/allmydata/test/test_mutable.py 455
110             d.addCallback(lambda res: self.failUnlessEqual(res,
111                                                            "line1line2line3"))
112             d.addCallback(lambda res: self.failUnlessCurrentSeqnumIs(n, 4, "ucw"))
113-
114+            d.addCallback(lambda res: n.modify(_toobig_modifier))
115             return d
116         d.addCallback(_created)
117         return d
118}
119
120Context:
121
122[Makefile: add jaunty support, rearrange debian sections in order of release
123warner@lothar.com**20090618050502]
124[test_util: add known-answer tests for hashutil tags
125warner@lothar.com**20090618045709]
126[tests: bump up a timeout that expired on Zandr's box
127zooko@zooko.com**20090613195703
128 Ignore-this: 853000f43665396b3734a99f72bd472d
129]
130[util: hooray!  A clean implementation of this simple utility!  Black Dew pointed out that the inverse of time.gmtime() is hidden in the "calendar" module.
131zooko@zooko.com**20090613160112
132 Ignore-this: 8359cc48ca1b8e2793e8b2afe2050cf4
133]
134[util: Brian's horrible hack to figure out how much localtime and utctime differ.  Now we'll see if it works on Windows.
135zooko@zooko.com**20090612204556
136 Ignore-this: 8c36431da4707da76472956c7750ecbd
137]
138[util: oops, time.tzset() doesn't work on Windows -- hopefully the new "London" unit test passes on Windows when we skip tzset() on platforms that don't have it
139zooko@zooko.com**20090612000920
140 Ignore-this: 7d314b8334cfa3f65f9635e3d3eb727e
141]
142[setup: edit install.html to warn Windows users away from Python v2.6
143zooko@zooko.com**20090611225506
144 Ignore-this: 89ad63eab49ede883ef92f2de5b5fc54
145]
146[util: fix time_format.iso_utc_time_to_seconds() so that it works even in London
147zooko@zooko.com**20090611221129
148 Ignore-this: 14dbb9840587797f848226fdb3645c08
149]
150[setup: run the same "make quicktest" on Windows as on non-Windows
151zooko@zooko.com**20090611193214
152 Ignore-this: d0c78377d3892373ec3d91e9e98bd8bd
153 I checked and it behaves about as well on Windows as the previous version did.
154]
155[tests: significantly increase timeouts that triggered on Zandr's ARM box
156zooko@zooko.com**20090610161043
157 Ignore-this: 2b3c556c5166a8267b4b15664d3aadfb
158]
159[test: multiple by 10 or so all timeouts that Zandr's ARM box just overran
160zooko@zooko.com**20090610125639
161 Ignore-this: bf62f063ab46814fd78de55a5fbc9d84
162]
163[tests: bump up timeout on a test that timed out on draco
164zooko@zooko.com**20090610044628
165 Ignore-this: f598b98cbae44dc947937c6ca54c10cb
166]
167[tests: raise the timeout for test_cli since Zandr's ARM machine totally burst through the old one
168zooko@zooko.com**20090609210509]
169[test_cli.Backup: increase timeout massively, it takes 1200s on zandr's ARM linkstation
170warner@lothar.com**20090609052801]
171[tests: double the timeouts on some tests which time-out on Francois's box
172zooko@zooko.com**20090609021753
173 Ignore-this: b2727b04402f24a9b9123d2f84068106
174]
175[tests: bump up timeouts so that the tests can finish before timeout on Francois's little arm box
176zooko@zooko.com**20090608225557
177 Ignore-this: fb83698338b2f12546cd3e1dcb896d34
178]
179[tests: increase timeouts on some other tests that timed-out on Francois's arm box
180zooko@zooko.com**20090605143437
181 Ignore-this: 2903cc20d914fc074c8d7a6c47740ba6
182]
183[tests: bump up the timeout on a bunch of tests that took longer than the default timeout (120s) on François Lenny-armv5tel
184zooko@zooko.com**20090605031444
185 Ignore-this: 84d67849b1f8edc88bf7001e31b5f7f3
186]
187[backup: remove the --no-backupdb command, the handling of "can't import sqlite", and the related tests, and change an error message to more correctly indicate failure to load the database from disk rather than failure to import sqlite module
188zooko@zooko.com**20090604173131
189 Ignore-this: 8200a9fdfc49243c280ecd1d0c44fa19
190 Fixes #728.
191]
192[setup: require pysqlite >= v2.0.5. if we are running on Python < 2.5
193zooko@zooko.com**20090604154548
194 Ignore-this: cf04f46079821df209d01dad2e24b40b
195]
196[setup: add pysqlite and sqlite to get_package_versions()
197zooko@zooko.com**20090604153728
198 Ignore-this: a1dea7fabeab2b08fb0d8d462facdb4d
199]
200[more refactoring: move get_all_serverids() and get_nickname_for_serverid() from Client to storage_broker
201warner@lothar.com**20090602030750]
202[more storage_broker refactoring: downloader gets a broker instead of a client,
203warner@lothar.com**20090602022511
204 use Client.get_storage_broker() accessor instead of direct attribute access.
205]
206[test_runner.py: remove test_client_no_noise: the issue in question is
207warner@lothar.com**20090601225007
208 ticketed in http://divmod.org/trac/ticket/2830 and doesn't need a Tahoe-side
209 change, plus this test fails on win32 for unrelated reasons (and test_client
210 is the place to think about the win32 issue).
211]
212[remove plaintext-hashing code from the helper interface, to close #722
213warner@lothar.com**20090601224916
214 and deny the Helper the ability to mount a partial-information-guessing
215 attack. This will probably break compatibility between new clients and very
216 old (pre-1.0) helpers.
217]
218[start to factor server-connection-management into a distinct 'StorageServerFarmBroker' object, separate from the client and the introducer. This is the starting point for #467: static server selection
219warner@lothar.com**20090601210604]
220[mutable: catch and display first error, so code bugs which break all servers get displayed better
221warner@lothar.com**20090601210407]
222[misc/run-with-pythonpath.py: exec() the child (on unix), to remove the intermediate process
223warner@lothar.com**20090601210137]
224[docs: small edit to about.html
225zooko@zooko.com**20090528233422
226 Ignore-this: 1cfbb1f8426ed6d63b2d3952e4464ddc
227]
228[docs: add links to Tahoe-LAFS for Paranoids and Tahoe-LAFS for Corporates in about.html
229zooko@zooko.com**20090528232717
230 Ignore-this: 7b70baa700d6b6f6e9ceec4132efe5
231]
232[docs: edit about.html and include network-and-reliance-topology.png (loaded from http://allmydata.org )
233zooko@zooko.com**20090527150916
234 Ignore-this: 44adc61cde8ced8be2f0a7dfc7d95dad
235]
236[docs: a few more edits to network-and-reliance-topology.svg
237zooko@zooko.com**20090527150458
238 Ignore-this: 2eac8c33fe71be25ff809b399c6193c1
239]
240[docs: update network-and-reliance-topology.svg for beauty and clarity
241zooko@zooko.com**20090527031123
242 Ignore-this: 5510914849771900ac29b4312470d84
243]
244[docs: update NEWS, relnotes.txt, CREDITS to mention WUI Style
245zooko@zooko.com**20090526233654
246 Ignore-this: 72d16ec833bc4a22af23d29ea1d5ff8b
247]
248[Modify markup of Tahoe web pages to be more amenable to styling; some minor changes of wording.
249Kevin Reid <kpreid@mac.com>**20090526232545
250 Ignore-this: 8845937f0df6c7ddc07abe3211428a6f
251]
252[Tweak wording in directory page: not-read-only is "modifiable", mention creating a directory _in this directory_.
253Kevin Reid <kpreid@mac.com>**20090526232414
254 Ignore-this: f006ec52ba2051802e025a60bcface56
255]
256[Comment on duplication of code/markup found during styling project.
257Kevin Reid <kpreid@mac.com>**20090503203442
258 Ignore-this: a4b7f9f0ab57d2c03be9ba761be8d854
259]
260[Add CSS styles to spiff up the Tahoe WUI's appearance, particularly the welcome page and directories.
261Kevin Reid <kpreid@mac.com>**20090503203142
262 Ignore-this: 5c50af241c1a958b5180ef2b6a49f626
263]
264[Link all Tahoe web pages to the /tahoe_css stylesheet which already exists.
265Kevin Reid <kpreid@mac.com>**20090503202533
266 Ignore-this: 2ea8d14d3168b9502cf39d5ea3f2f2a8
267]
268[Fix broken link from Provisioning to Reliability page.
269Kevin Reid <kpreid@mac.com>**20090501191050
270 Ignore-this: 56dc1a5e659b70cc02dc4df7b5d518cd
271]
272[docs: network-and-reliance-topology.svg: nicer server icons, mv out of the "specifications" subdir
273zooko@zooko.com**20090526165842
274 Ignore-this: 8f47ab3a0ab782c1f0d46e10bcaebe5b
275]
276[docs: update network-and-reliance-topology.svg
277zooko@zooko.com**20090526163105
278 Ignore-this: 2b864b4ed8743d4a15dfbb7eff3fa561
279]
280[accounting-overview.txt: more edits
281warner@lothar.com**20090523190359]
282[accounting-overview.txt: small edits
283warner@lothar.com**20090523184011]
284[_auto_deps.py: require foolscap-0.4.1, which adds an important fix for py2.4
285warner@lothar.com**20090523011103]
286[immutable/encode.py: tolerate immediate _remove_shareholder by copying the
287warner@lothar.com**20090522184424
288 landlord list before iterating over it. This can probably only happen in unit
289 tests, but cleaning it up makes certain test failures easier to analyze.
290]
291[switch to using RemoteException instead of 'wrapped' RemoteReferences. Should fix #653, the rref-EQ problem
292warner@lothar.com**20090522004632]
293[switch all foolscap imports to use foolscap.api or foolscap.logging
294warner@lothar.com**20090522003823]
295[_auto_deps.py: bump our foolscap dependency to 0.4.0, since I'm about to start using its new features
296warner@lothar.com**20090522002100]
297[test_runner.py: fix minor typo
298warner@lothar.com**20090520033620]
299[setup: fix bug (wrong import) in error message, as noticed by pyflakes
300zooko@zooko.com**20090519195642
301 Ignore-this: f1b9f8c00b46c1b5f2f20e5fc424f341
302]
303[setup: fix trivial bug in recent patch to test base64.py at startup
304zooko@zooko.com**20090519195129
305 Ignore-this: f6be038f74b53ca69e7109fe34adfbc
306]
307[setup: make Tahoe exit at startup with a useful error message if the base64.py module is buggy (fixes part of #710)
308zooko@zooko.com**20090519194555
309 Ignore-this: aa4d398235ddca8d417d61c9688e154
310]
311[test_introducer.py: add a test for the python2.4.0/2.4.1 bug in base64.b32decode
312warner@lothar.com**20090519034101]
313[immutable WriteBucketProxy: use pipeline to speed up uploads by overlapping roundtrips, for #392
314warner@lothar.com**20090518234422]
315[util/pipeline.py: new utility class to manage size-limited work pipelines, for #392
316warner@lothar.com**20090518234326]
317[docs: add a diagram that I'm about to show to the Boulder Linux Users Group: network-and-reliance-topology.svg
318zooko@zooko.com**20090514232059
319 Ignore-this: 2420c0a7c254c9f0f2349d9130490d33
320]
321[tests: mark test_runner as coded in utf-8 instead of ascii
322zooko@zooko.com**20090507223151
323 Ignore-this: ccf1ba9e5a9b53602701a36f9fdb545e
324]
325[tests: raise timeout on test_runner.RunNode.test_introducer from 120s to 240s, since it hit the 120s time-out on François Lenny-armv5tel
326zooko@zooko.com**20090507215012
327 Ignore-this: ba18fe6832ba255d4971e8f623ed7da5
328]
329[setup: fix comment in setup.py
330zooko@zooko.com**20090507215003
331 Ignore-this: c46ef664630d52733138ef7fbc551c1c
332]
333[docs: how_to_make_a_tahoe_release.txt: a couple of small edits
334zooko@zooko.com**20090507214932
335 Ignore-this: ae92aa835ad369f4b9e6e49d681957a3
336]
337[.darcs-boringfile: also ignore .gitignore
338warner@allmydata.com**20090415210550
339 Ignore-this: d29db314a1e506f6240859559436b4c3
340]
341[.darcs-boringfile: ignore .git, I'm starting to play around with it
342warner@allmydata.com**20090415205929
343 Ignore-this: 89234453516483c9586cd6e1351e88b5
344]
345[fix quicktest: stop using setuptools, add misc/run-with-pythonpath.py, to make it run faster
346warner@lothar.com**20090414201400]
347[TAG allmydata-tahoe-1.4.1
348zooko@zooko.com**20090414025636
349 Ignore-this: de78fc32364c83e9f4e26b5abcfdea4a
350]
351Patch bundle hash:
352f3de4425ac8701ac3309098e61156bb17de082db