projects
/
tahoe-lafs
/
tahoe-lafs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a68ad06
)
storage.expirer: handle upgrades better
author
Brian Warner
<warner@lothar.com>
Mon, 9 Mar 2009 03:42:20 +0000
(20:42 -0700)
committer
Brian Warner
<warner@lothar.com>
Mon, 9 Mar 2009 03:42:20 +0000
(20:42 -0700)
src/allmydata/storage/expirer.py
patch
|
blob
|
history
diff --git
a/src/allmydata/storage/expirer.py
b/src/allmydata/storage/expirer.py
index 79254241105dca1c5bd169c19c519ef31e7a4b00..32913cb9e820f45f170b5ef80d2eccb544cc3dfb 100644
(file)
--- a/
src/allmydata/storage/expirer.py
+++ b/
src/allmydata/storage/expirer.py
@@
-61,6
+61,10
@@
class LeaseCheckingCrawler(ShareCrawler):
# get started: unit tests do this
so_far = self.create_empty_cycle_dict()
self.state.setdefault("cycle-to-date", so_far)
+ # in case we upgrade the code while a cycle is in progress, update
+ # the keys individually
+ for k in self.state["cycle-to-date"]:
+ self.state["cycle-to-date"].setdefault(k, so_far[k])
# initialize history
if not os.path.exists(self.historyfile):