Ticket #1520: fixedmutableasserts.darcs.patch

File fixedmutableasserts.darcs.patch, 8.3 KB (added by zancas, at 2011-09-01T08:54:00Z)
Line 
1Thu Sep  1 02:41:44 MDT 2011  wilcoxjg@gmail.com
2  * storage/mutable.py: special characters in struct.foo arguments indicate standard as opposed to native sizes, we should be using these characters in these asserts
3
4New patches:
5
6[storage/mutable.py: special characters in struct.foo arguments indicate standard as opposed to native sizes, we should be using these characters in these asserts
7wilcoxjg@gmail.com**20110901084144
8 Ignore-this: 28ace2b2678642e4d7269ddab8c67f30
9] hunk ./src/allmydata/storage/mutable.py 31
10 # 9   ??        n*92    extra leases
11 
12 
13-assert struct.calcsize("L"), 4 # The struct module doc says that L's are 4 bytes in size.
14-assert struct.calcsize("Q"), 8 # The struct module doc says that Q's are 8 bytes in size (at least with big-endian ordering).
15+assert struct.calcsize(">L") == 4 # The struct module doc says that L's are 4 bytes in size.
16+assert struct.calcsize(">Q") == 8 # The struct module doc says that Q's are 8 bytes in size (at least with big-endian ordering).
17 
18 class MutableShareFile:
19 
20
21Context:
22
23[docs/write_coordination.rst: fix formatting and add more specific warning about access via sshfs.
24david-sarah@jacaranda.org**20110831232148
25 Ignore-this: cd9c851d3eb4e0a1e088f337c291586c
26]
27[test_mutable.Version: consolidate some tests, reduce runtime from 19s to 15s
28warner@lothar.com**20110831050451
29 Ignore-this: 64815284d9e536f8f3798b5f44cf580c
30]
31[mutable/retrieve: handle the case where self._read_length is 0.
32Kevan Carstensen <kevan@isnotajoke.com>**20110830210141
33 Ignore-this: fceafbe485851ca53f2774e5a4fd8d30
34 
35 Note that the downloader will still fetch a segment for a zero-length
36 read, which is wasteful. Fixing that isn't specifically required to fix
37 #1512, but it should probably be fixed before 1.9.
38]
39[NEWS: added summary of all changes since 1.8.2. Needs editing.
40Brian Warner <warner@lothar.com>**20110830163205
41 Ignore-this: 273899b37a899fc6919b74572454b8b2
42]
43[test_mutable.Update: only upload the files needed for each test. refs #1500
44Brian Warner <warner@lothar.com>**20110829072717
45 Ignore-this: 4d2ab4c7523af9054af7ecca9c3d9dc7
46 
47 This first step shaves 15% off the runtime: from 139s to 119s on my laptop.
48 It also fixes a couple of places where a Deferred was being dropped, which
49 would cause two tests to run in parallel and also confuse error reporting.
50]
51[Let Uploader retain History instead of passing it into upload(). Fixes #1079.
52Brian Warner <warner@lothar.com>**20110829063246
53 Ignore-this: 3902c58ec12bd4b2d876806248e19f17
54 
55 This consistently records all immutable uploads in the Recent Uploads And
56 Downloads page, regardless of code path. Previously, certain webapi upload
57 operations (like PUT /uri/$DIRCAP/newchildname) failed to pass the History
58 object and were left out.
59]
60[Fix mutable publish/retrieve timing status displays. Fixes #1505.
61Brian Warner <warner@lothar.com>**20110828232221
62 Ignore-this: 4080ce065cf481b2180fd711c9772dd6
63 
64 publish:
65 * encrypt and encode times are cumulative, not just current-segment
66 
67 retrieve:
68 * same for decrypt and decode times
69 * update "current status" to include segment number
70 * set status to Finished/Failed when download is complete
71 * set progress to 1.0 when complete
72 
73 More improvements to consider:
74 * progress is currently 0% or 100%: should calculate how many segments are
75   involved (remembering retrieve can be less than the whole file) and set it
76   to a fraction
77 * "fetch" time is fuzzy: what we want is to know how much of the delay is not
78   our own fault, but since we do decode/decrypt work while waiting for more
79   shares, it's not straightforward
80]
81[Teach 'tahoe debug catalog-shares about MDMF. Closes #1507.
82Brian Warner <warner@lothar.com>**20110828080931
83 Ignore-this: 56ef2951db1a648353d7daac6a04c7d1
84]
85[debug.py: remove some dead comments
86Brian Warner <warner@lothar.com>**20110828074556
87 Ignore-this: 40e74040dd4d14fd2f4e4baaae506b31
88]
89[hush pyflakes
90Brian Warner <warner@lothar.com>**20110828074254
91 Ignore-this: bef9d537a969fa82fe4decc4ba2acb09
92]
93[MutableFileNode.set_downloader_hints: never depend upon order of dict.values()
94Brian Warner <warner@lothar.com>**20110828074103
95 Ignore-this: caaf1aa518dbdde4d797b7f335230faa
96 
97 The old code was calculating the "extension parameters" (a list) from the
98 downloader hints (a dictionary) with hints.values(), which is not stable, and
99 would result in corrupted filecaps (with the 'k' and 'segsize' hints
100 occasionally swapped). The new code always uses [k,segsize].
101]
102[layout.py: fix MDMF share layout documentation
103Brian Warner <warner@lothar.com>**20110828073921
104 Ignore-this: 3f13366fed75b5e31b51ae895450a225
105]
106[teach 'tahoe debug dump-share' about MDMF and offsets. refs #1507
107Brian Warner <warner@lothar.com>**20110828073834
108 Ignore-this: 3a9d2ef9c47a72bf1506ba41199a1dea
109]
110[test_mutable.Version.test_debug: use splitlines() to fix buildslaves
111Brian Warner <warner@lothar.com>**20110828064728
112 Ignore-this: c7f6245426fc80b9d1ae901d5218246a
113 
114 Any slave running in a directory with spaces in the name was miscounting
115 shares, causing the test to fail.
116]
117[test_mutable.Version: exercise 'tahoe debug find-shares' on MDMF. refs #1507
118Brian Warner <warner@lothar.com>**20110828005542
119 Ignore-this: cb20bea1c28bfa50a72317d70e109672
120 
121 Also changes NoNetworkGrid to put shares in storage/shares/ .
122]
123[test_mutable.py: oops, missed a .todo
124Brian Warner <warner@lothar.com>**20110828002118
125 Ignore-this: fda09ae86481352b7a627c278d2a3940
126]
127[test_mutable: merge davidsarah's patch with my Version refactorings
128warner@lothar.com**20110827235707
129 Ignore-this: b5aaf481c90d99e33827273b5d118fd0
130]
131[Make the immutable/read-only constraint checking for MDMF URIs identical to that for SSK URIs. refs #393
132david-sarah@jacaranda.org**20110823012720
133 Ignore-this: e1f59d7ff2007c81dbef2aeb14abd721
134]
135[Additional tests for MDMF URIs and for zero-length files. refs #393
136david-sarah@jacaranda.org**20110823011532
137 Ignore-this: a7cc0c09d1d2d72413f9cd227c47a9d5
138]
139[Additional tests for zero-length partial reads and updates to mutable versions. refs #393
140david-sarah@jacaranda.org**20110822014111
141 Ignore-this: 5fc6f4d06e11910124e4a277ec8a43ea
142]
143[test_mutable.Version: factor out some expensive uploads, save 25% runtime
144Brian Warner <warner@lothar.com>**20110827232737
145 Ignore-this: ea37383eb85ea0894b254fe4dfb45544
146]
147[SDMF: update filenode with correct k/N after Retrieve. Fixes #1510.
148Brian Warner <warner@lothar.com>**20110827225031
149 Ignore-this: b50ae6e1045818c400079f118b4ef48
150 
151 Without this, we get a regression when modifying a mutable file that was
152 created with more shares (larger N) than our current tahoe.cfg . The
153 modification attempt creates new versions of the (0,1,..,newN-1) shares, but
154 leaves the old versions of the (newN,..,oldN-1) shares alone (and throws a
155 assertion error in SDMFSlotWriteProxy.finish_publishing in the process).
156 
157 The mixed versions that result (some shares with e.g. N=10, some with N=20,
158 such that both versions are recoverable) cause problems for the Publish code,
159 even before MDMF landed. Might be related to refs #1390 and refs #1042.
160]
161[layout.py: annotate assertion to figure out 'tahoe backup' failure
162Brian Warner <warner@lothar.com>**20110827195253
163 Ignore-this: 9b92b954e3ed0d0f80154fff1ff674e5
164]
165[Add 'tahoe debug dump-cap' support for MDMF, DIR2-CHK, DIR2-MDMF. refs #1507.
166Brian Warner <warner@lothar.com>**20110827195048
167 Ignore-this: 61c6af5e33fc88e0251e697a50addb2c
168 
169 This also adds tests for all those cases, and fixes an omission in uri.py
170 that broke parsing of DIR2-MDMF-Verifier and DIR2-CHK-Verifier.
171]
172[MDMF: more writable/writeable consistentifications
173warner@lothar.com**20110827190602
174 Ignore-this: 22492a9e20c1819ddb12091062888b55
175]
176[MDMF: s/Writable/Writeable/g, for consistency with existing SDMF code
177warner@lothar.com**20110827183357
178 Ignore-this: 9dd312acedbdb2fc2f7bef0d0fb17c0b
179]
180[setup.cfg: remove no-longer-supported test_mac_diskimage alias. refs #1479
181david-sarah@jacaranda.org**20110826230345
182 Ignore-this: 40e908b8937322a290fb8012bfcad02a
183]
184[test_mutable.Update: increase timeout from 120s to 400s, slaves are failing
185Brian Warner <warner@lothar.com>**20110825230140
186 Ignore-this: 101b1924a30cdbda9b2e419e95ca15ec
187]
188[tests: fix check_memory test
189zooko@zooko.com**20110825201116
190 Ignore-this: 4d66299fa8cb61d2ca04b3f45344d835
191 fixes #1503
192]
193[TAG allmydata-tahoe-1.9.0a1
194warner@lothar.com**20110825161122
195 Ignore-this: 3cbf49f00dbda58189f893c427f65605
196]
197Patch bundle hash:
1987b28aaf9e2830e6259ded7e99dfcde7376d25c19