leasedb: use a semantic primary key (storage_index, shnum, account_id), rather than...
authorDavid-Sarah Hopwood <david-sarah@jacaranda.org>
Sat, 15 Dec 2012 06:24:41 +0000 (06:24 +0000)
committerDaira Hopwood <daira@jacaranda.org>
Fri, 17 Apr 2015 21:31:01 +0000 (22:31 +0100)
commit4fa0e4a4d83a95c6734628acb438bec6149b5c64
tree7b608a63a635c735bd1e735dcfe26c8107ffa19d
parentcd698bc7d68c8a8ea1dd00ae6abc506a4631facd
leasedb: use a semantic primary key (storage_index, shnum, account_id), rather than an integer, for the leases table.
Take advantage of this to simplify add_or_renew_leases.
Fix a bug in add_starter_lease (which is not used yet) when a starter lease already exists.
Clean up leftover accesses to self._dirty.

Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
src/allmydata/storage/leasedb.py