drop view segment_info;
create view segment_info as
-select segmentid, mtime, size, cast(size * utilization as integer) as used,
- utilization
+select segmentid, mtime, size, expire_time,
+ cast(size * utilization as integer) as used, utilization
from segments join
(select segmentid, max(utilization) as utilization
from segments_used group by segmentid)
cur = self.cursor()
segments = []
cur.execute("""select segmentid, used, size, mtime,
- julianday('now') - mtime as age from segment_info""")
+ julianday('now') - mtime as age from segment_info
+ where expire_time is null""")
for row in cur:
info = self.SegmentInfo()
info.id = row[0]
-- Overall estimate of segment utilization, for all snapshots combined.
create view segment_info as
-select segmentid, mtime, size, cast(size * utilization as integer) as used,
- utilization
+select segmentid, mtime, size, expire_time,
+ cast(size * utilization as integer) as used, utilization
from segments join
(select segmentid, max(utilization) as utilization
from segments_used group by segmentid)