Minor fix to segment cleaning.
authorMichael Vrable <mvrable@cs.ucsd.edu>
Wed, 9 Jan 2008 21:20:50 +0000 (13:20 -0800)
committerMichael Vrable <mvrable@turin.ucsd.edu>
Wed, 9 Jan 2008 21:20:50 +0000 (13:20 -0800)
Previously, all objects were marked to be rewritten, instead of merely
those in segments marked for cleaning.  Properly handle this.

lbs.py

diff --git a/lbs.py b/lbs.py
index 4d2641f..5213b89 100644 (file)
--- a/lbs.py
+++ b/lbs.py
@@ -733,5 +733,6 @@ class LocalDatabase:
         cutoffs.reverse()
         for i in range(len(cutoffs)):
             cur.execute("""update block_index set expired = ?
-                           where round(? - timestamp) > ?""",
+                           where round(? - timestamp) > ?
+                             and expired is not null""",
                         (i, now, cutoffs[i]))