[tahoe-dev] expiration of shares that never had a lease?

Greg Troxel gdt at ir.bbn.com
Fri Feb 25 14:13:11 PST 2011


Brian Warner <warner at lothar.com> writes:

> On 2/24/11 5:37 AM, Greg Troxel wrote:
>> 
>> I'm not entirely clear on the 'tahoe debug catalog-shares' output, but
>> it seems that field 6 is the remaining lease duration. On a pubgrid
>> server, I find that about half the shares have 0 in this field, and
>> the files are quite old.
>
> Yup, that field is the minimum of all remaining lease durations, in
> seconds, but it's set to 0 if that minimum is negative
> (src/allmydata/scripts/debug.py L623):
>
>         expiration_time = min( [lease.expiration_time
>                                 for lease in sf.get_leases()] )
>         expiration = max(0, expiration_time - now)
>
>> So can shares be created without a lease? (Perhaps, on a server that
>> didn't have expiration enabled?)
>
> No, that code doesn't actually tolerate zero-lease shares (I should have
> used min([leases]+[0]) to avoid a crash if there were no leases at all).
> So I think you're seeing old shares that can be expired by the lease
> crawler.

Hmm.  On another server, I had tons of shares (about 1G) with 0 in the
catalog-shares output.  I just rm'd them all.   It might be nice to have
catalog-shares include a column with number of leases.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
URL: <http://tahoe-lafs.org/pipermail/tahoe-dev/attachments/20110225/2b370dfb/attachment.pgp>


More information about the tahoe-dev mailing list