[tahoe-lafs-trac-stream] [tahoe-lafs] #1836: use leasedb (not crawler) to figure out how many shares you have and how many bytes
tahoe-lafs
trac at tahoe-lafs.org
Sat Dec 15 00:59:49 UTC 2012
#1836: use leasedb (not crawler) to figure out how many shares you have and how
many bytes
-------------------------+-------------------------------------------------
Reporter: zooko | Owner: davidsarah
Type: defect | Status: assigned
Priority: normal | Milestone: undecided
Component: code- | Version: 1.9.2
storage | Keywords: leases garbage-collection
Resolution: | accounting
Launchpad Bug: |
-------------------------+-------------------------------------------------
Comment (by davidsarah):
The most basic form of the 'total used space' query is
{{{
SELECT SUM(`used_space`) FROM `shares`
}}}
How much account-specific information should we add? At the moment, there
are only two accounts -- anonymous and starter -- but that is already
enough to introduce the complication that more than one account can hold a
lease on the same share, so the query above is not equivalent to
{{{
SELECT SUM(`used_space`) FROM `shares` s JOIN `leases` l
ON (s.`storage_index` = l.`storage_index` AND s.`shnum` =
l.`shnum`)
}}}
since that can count space for a share more than once.
--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/1836#comment:8>
tahoe-lafs <https://tahoe-lafs.org>
secure decentralized storage
More information about the tahoe-lafs-trac-stream
mailing list