Only in allmydata-tahoe-1.8.2-pristine: allmydata-tahoe-1.8.2
diff -ur allmydata-tahoe-1.8.2-bug1418/build/lib.linux-i686-2.6/allmydata/immutable/encode.py allmydata-tahoe-1.8.2-pristine/build/lib.linux-i686-2.6/allmydata/immutable/encode.py
old
|
new
|
|
105 | 105 | def _got_size(size): |
106 | 106 | self.log(format="file size: %(size)d", size=size) |
107 | 107 | self.file_size = size |
108 | | precondition(isinstance(self.file_size, (int, long)), self.file_size) |
109 | 108 | d.addCallback(_got_size) |
110 | 109 | d.addCallback(lambda res: eu.get_all_encoding_parameters()) |
111 | 110 | d.addCallback(self._got_all_encoding_parameters) |
… |
… |
|
119 | 118 | def _got_all_encoding_parameters(self, params): |
120 | 119 | assert not self._codec |
121 | 120 | k, happy, n, segsize = params |
122 | | precondition(isinstance(segsize, (int, long)), segsize) |
123 | 121 | self.required_shares = k |
124 | 122 | self.servers_of_happiness = happy |
125 | 123 | self.num_shares = n |
… |
… |
|
131 | 129 | |
132 | 130 | self.num_segments = mathutil.div_ceil(self.file_size, |
133 | 131 | self.segment_size) |
134 | | precondition(isinstance(self.num_segments, (int, long)), self.num_segments) |
135 | 132 | |
136 | 133 | self._codec = CRSEncoder() |
137 | 134 | self._codec.set_params(self.segment_size, |
diff -ur allmydata-tahoe-1.8.2-bug1418/build/lib.linux-i686-2.6/allmydata/immutable/upload.py allmydata-tahoe-1.8.2-pristine/build/lib.linux-i686-2.6/allmydata/immutable/upload.py
old
|
new
|
|
608 | 608 | d = self.original.get_all_encoding_parameters() |
609 | 609 | def _got(encoding_parameters): |
610 | 610 | (k, happy, n, segsize) = encoding_parameters |
611 | | precondition(isinstance(segsize, (int, long)), segsize) |
612 | 611 | self._segment_size = segsize # used by segment hashers |
613 | 612 | self._encoding_parameters = encoding_parameters |
614 | 613 | self.log("my encoding parameters: %s" % (encoding_parameters,), |
… |
… |
|
916 | 915 | share_size = encoder.get_param("share_size") |
917 | 916 | block_size = encoder.get_param("block_size") |
918 | 917 | num_segments = encoder.get_param("num_segments") |
919 | | precondition(isinstance(num_segments, (int, long)), num_segments) |
920 | 918 | k,desired,n = encoder.get_param("share_counts") |
921 | 919 | |
922 | 920 | self._peer_selection_started = time.time() |
… |
… |
|
1272 | 1270 | if self._all_encoding_parameters: |
1273 | 1271 | return defer.succeed(self._all_encoding_parameters) |
1274 | 1272 | |
1275 | | precondition(self.max_segment_size is None or isinstance(self.max_segment_size, (int, long)), self.max_segment_size) |
1276 | | precondition(isinstance(self.default_max_segment_size, (int, long)), self.default_max_segment_size) |
1277 | 1273 | max_segsize = self.max_segment_size or self.default_max_segment_size |
1278 | 1274 | k = self.encoding_param_k or self.default_encoding_param_k |
1279 | 1275 | happy = self.encoding_param_happy or self.default_encoding_param_happy |
… |
… |
|
1281 | 1277 | |
1282 | 1278 | d = self.get_size() |
1283 | 1279 | def _got_size(file_size): |
1284 | | precondition(isinstance(file_size, (int, long)), file_size) |
1285 | 1280 | # for small files, shrink the segment size to avoid wasting space |
1286 | 1281 | segsize = min(max_segsize, file_size) |
1287 | | precondition(isinstance(segsize, (int, long)), segsize) |
1288 | 1282 | # this must be a multiple of 'required_shares'==k |
1289 | 1283 | segsize = mathutil.next_multiple(segsize, k) |
1290 | | precondition(isinstance(segsize, (int, long)), segsize) |
1291 | 1284 | encoding_parameters = (k, happy, n, segsize) |
1292 | 1285 | self._all_encoding_parameters = encoding_parameters |
1293 | 1286 | return encoding_parameters |
diff -ur allmydata-tahoe-1.8.2-bug1418/build/lib.linux-i686-2.6/allmydata/storage/crawler.py allmydata-tahoe-1.8.2-pristine/build/lib.linux-i686-2.6/allmydata/storage/crawler.py
old
|
new
|
|
443 | 443 | when more than one share is placed on a single server. |
444 | 444 | """ |
445 | 445 | |
446 | | minimum_cycle_time = 4*24*60*60 # we don't need this more than once an hour |
| 446 | minimum_cycle_time = 60*60 # we don't need this more than once an hour |
447 | 447 | |
448 | 448 | def __init__(self, server, statefile, num_sample_prefixes=1): |
449 | 449 | ShareCrawler.__init__(self, server, statefile) |
diff -ur allmydata-tahoe-1.8.2-bug1418/build/lib.linux-i686-2.6/allmydata/storage/expirer.py allmydata-tahoe-1.8.2-pristine/build/lib.linux-i686-2.6/allmydata/storage/expirer.py
old
|
new
|
|
46 | 46 | """ |
47 | 47 | |
48 | 48 | slow_start = 360 # wait 6 minutes after startup |
49 | | minimum_cycle_time = 14*24*60*60 # not more than twice per day |
| 49 | minimum_cycle_time = 12*60*60 # not more than twice per day |
50 | 50 | |
51 | 51 | def __init__(self, server, statefile, historyfile, |
52 | 52 | expiration_enabled, mode, |
diff -ur allmydata-tahoe-1.8.2-bug1418/build/lib.linux-i686-2.6/allmydata/util/mathutil.py allmydata-tahoe-1.8.2-pristine/build/lib.linux-i686-2.6/allmydata/util/mathutil.py
old
|
new
|
|
28 | 28 | def is_power_of_k(n, k): |
29 | 29 | return k**int(math.log(n, k) + 0.5) == n |
30 | 30 | |
31 | | def next_power_of_k_math(n, k): |
| 31 | def next_power_of_k(n, k): |
32 | 32 | if n == 0: |
33 | 33 | x = 0 |
34 | 34 | else: |
… |
… |
|
38 | 38 | else: |
39 | 39 | return k**x |
40 | 40 | |
41 | | def next_power_of_k_alt(n, k): |
42 | | p = 1 |
43 | | while p < n: |
44 | | p *= k |
45 | | return p |
46 | | |
47 | | def next_power_of_k(n, k): |
48 | | try: |
49 | | return next_power_of_k_math(n, k) |
50 | | except ValueError, e: |
51 | | print "XXX n: %s :: %s, k: %s :: %s, next_power_of_k_alt: %s" % (n, type(n), k, type(k), next_power_of_k_alt(n, k)) |
52 | | e.args = tuple(e.args + (n, k, next_power_of_k_alt(n, k))) |
53 | | raise |
54 | | |
55 | 41 | def ave(l): |
56 | 42 | return sum(l) / len(l) |
57 | 43 | |
diff -ur allmydata-tahoe-1.8.2-bug1418/src/allmydata/immutable/encode.py allmydata-tahoe-1.8.2-pristine/src/allmydata/immutable/encode.py
old
|
new
|
|
105 | 105 | def _got_size(size): |
106 | 106 | self.log(format="file size: %(size)d", size=size) |
107 | 107 | self.file_size = size |
108 | | precondition(isinstance(self.file_size, (int, long)), self.file_size) |
109 | 108 | d.addCallback(_got_size) |
110 | 109 | d.addCallback(lambda res: eu.get_all_encoding_parameters()) |
111 | 110 | d.addCallback(self._got_all_encoding_parameters) |
… |
… |
|
119 | 118 | def _got_all_encoding_parameters(self, params): |
120 | 119 | assert not self._codec |
121 | 120 | k, happy, n, segsize = params |
122 | | precondition(isinstance(segsize, (int, long)), segsize) |
123 | 121 | self.required_shares = k |
124 | 122 | self.servers_of_happiness = happy |
125 | 123 | self.num_shares = n |
… |
… |
|
131 | 129 | |
132 | 130 | self.num_segments = mathutil.div_ceil(self.file_size, |
133 | 131 | self.segment_size) |
134 | | precondition(isinstance(self.num_segments, (int, long)), self.num_segments) |
135 | 132 | |
136 | 133 | self._codec = CRSEncoder() |
137 | 134 | self._codec.set_params(self.segment_size, |
diff -ur allmydata-tahoe-1.8.2-bug1418/src/allmydata/immutable/upload.py allmydata-tahoe-1.8.2-pristine/src/allmydata/immutable/upload.py
old
|
new
|
|
608 | 608 | d = self.original.get_all_encoding_parameters() |
609 | 609 | def _got(encoding_parameters): |
610 | 610 | (k, happy, n, segsize) = encoding_parameters |
611 | | precondition(isinstance(segsize, (int, long)), segsize) |
612 | 611 | self._segment_size = segsize # used by segment hashers |
613 | 612 | self._encoding_parameters = encoding_parameters |
614 | 613 | self.log("my encoding parameters: %s" % (encoding_parameters,), |
… |
… |
|
916 | 915 | share_size = encoder.get_param("share_size") |
917 | 916 | block_size = encoder.get_param("block_size") |
918 | 917 | num_segments = encoder.get_param("num_segments") |
919 | | precondition(isinstance(num_segments, (int, long)), num_segments) |
920 | 918 | k,desired,n = encoder.get_param("share_counts") |
921 | 919 | |
922 | 920 | self._peer_selection_started = time.time() |
… |
… |
|
1272 | 1270 | if self._all_encoding_parameters: |
1273 | 1271 | return defer.succeed(self._all_encoding_parameters) |
1274 | 1272 | |
1275 | | precondition(self.max_segment_size is None or isinstance(self.max_segment_size, (int, long)), self.max_segment_size) |
1276 | | precondition(isinstance(self.default_max_segment_size, (int, long)), self.default_max_segment_size) |
1277 | 1273 | max_segsize = self.max_segment_size or self.default_max_segment_size |
1278 | 1274 | k = self.encoding_param_k or self.default_encoding_param_k |
1279 | 1275 | happy = self.encoding_param_happy or self.default_encoding_param_happy |
… |
… |
|
1281 | 1277 | |
1282 | 1278 | d = self.get_size() |
1283 | 1279 | def _got_size(file_size): |
1284 | | precondition(isinstance(file_size, (int, long)), file_size) |
1285 | 1280 | # for small files, shrink the segment size to avoid wasting space |
1286 | 1281 | segsize = min(max_segsize, file_size) |
1287 | | precondition(isinstance(segsize, (int, long)), segsize) |
1288 | 1282 | # this must be a multiple of 'required_shares'==k |
1289 | 1283 | segsize = mathutil.next_multiple(segsize, k) |
1290 | | precondition(isinstance(segsize, (int, long)), segsize) |
1291 | 1284 | encoding_parameters = (k, happy, n, segsize) |
1292 | 1285 | self._all_encoding_parameters = encoding_parameters |
1293 | 1286 | return encoding_parameters |
diff -ur allmydata-tahoe-1.8.2-bug1418/src/allmydata/storage/crawler.py allmydata-tahoe-1.8.2-pristine/src/allmydata/storage/crawler.py
old
|
new
|
|
443 | 443 | when more than one share is placed on a single server. |
444 | 444 | """ |
445 | 445 | |
446 | | minimum_cycle_time = 4*24*60*60 # we don't need this more than once an hour |
| 446 | minimum_cycle_time = 60*60 # we don't need this more than once an hour |
447 | 447 | |
448 | 448 | def __init__(self, server, statefile, num_sample_prefixes=1): |
449 | 449 | ShareCrawler.__init__(self, server, statefile) |
diff -ur allmydata-tahoe-1.8.2-bug1418/src/allmydata/storage/expirer.py allmydata-tahoe-1.8.2-pristine/src/allmydata/storage/expirer.py
old
|
new
|
|
46 | 46 | """ |
47 | 47 | |
48 | 48 | slow_start = 360 # wait 6 minutes after startup |
49 | | minimum_cycle_time = 14*24*60*60 # not more than twice per day |
| 49 | minimum_cycle_time = 12*60*60 # not more than twice per day |
50 | 50 | |
51 | 51 | def __init__(self, server, statefile, historyfile, |
52 | 52 | expiration_enabled, mode, |
diff -ur allmydata-tahoe-1.8.2-bug1418/src/allmydata/util/mathutil.py allmydata-tahoe-1.8.2-pristine/src/allmydata/util/mathutil.py
old
|
new
|
|
28 | 28 | def is_power_of_k(n, k): |
29 | 29 | return k**int(math.log(n, k) + 0.5) == n |
30 | 30 | |
31 | | def next_power_of_k_math(n, k): |
| 31 | def next_power_of_k(n, k): |
32 | 32 | if n == 0: |
33 | 33 | x = 0 |
34 | 34 | else: |
… |
… |
|
38 | 38 | else: |
39 | 39 | return k**x |
40 | 40 | |
41 | | def next_power_of_k_alt(n, k): |
42 | | p = 1 |
43 | | while p < n: |
44 | | p *= k |
45 | | return p |
46 | | |
47 | | def next_power_of_k(n, k): |
48 | | try: |
49 | | return next_power_of_k_math(n, k) |
50 | | except ValueError, e: |
51 | | print "XXX n: %s :: %s, k: %s :: %s, next_power_of_k_alt: %s" % (n, type(n), k, type(k), next_power_of_k_alt(n, k)) |
52 | | e.args = tuple(e.args + (n, k, next_power_of_k_alt(n, k))) |
53 | | raise |
54 | | |
55 | 41 | def ave(l): |
56 | 42 | return sum(l) / len(l) |
57 | 43 | |
Only in allmydata-tahoe-1.8.2-pristine/support/lib/python2.6/site-packages: argparse-1.2.1-py2.6.egg
Only in allmydata-tahoe-1.8.2-bug1418/support/lib/python2.6/site-packages: argparse-1.2-py2.6.egg
diff -ur allmydata-tahoe-1.8.2-bug1418/support/lib/python2.6/site-packages/easy-install.pth allmydata-tahoe-1.8.2-pristine/support/lib/python2.6/site-packages/easy-install.pth
old
|
new
|
|
3 | 3 | /home/rycee/allmydata-tahoe-1.8.2/src |
4 | 4 | ./mock-0.6.0-py2.6.egg |
5 | 5 | ./foolscap-0.6.1-py2.6.egg |
6 | | ./simplejson-2.1.3-py2.6-linux-i686.egg |
| 6 | ./simplejson-2.1.6-py2.6-linux-i686.egg |
7 | 7 | ./zfec-1.4.10-py2.6-linux-i686.egg |
8 | 8 | ./pyutil-1.8.4-py2.6.egg |
9 | | ./argparse-1.2-py2.6.egg |
| 9 | ./argparse-1.2.1-py2.6.egg |
10 | 10 | ./zbase32-1.1.3-py2.6.egg |
11 | 11 | /usr/lib/pymodules/python2.6 |
12 | 12 | ./Twisted-10.2.0-py2.6-linux-i686.egg |