#1816 new defect

add a lease renewal method that only renews some shares in a shareset, to be used by repair/rebalancing — at Version 4

Reported by: davidsarah Owned by: warner
Priority: normal Milestone: undecided
Component: code-storage Version: 1.9.2
Keywords: forward-compatibility rebalancing repair RIStorageServer leases leasedb servers-of-happiness Cc:
Launchpad Bug:

Description (last modified by davidsarah)

The current remote_add_lease and remote_renew_lease methods of RIStorageServer add or renew leases on all shares in a shareset. This is not ideal for rebalancing, because it provides no way to indicate which shnums are no longer needed on a given server.

The new method could also allow requesting a specific lease duration. (With accounting, we will at some point have a way to configure maximum lease durations for particular accounts.)

Change History (4)

comment:1 Changed at 2012-09-28T01:24:08Z by davidsarah

Note that the new method will not need arguments for lease renewal or cancel secrets, since those are not used by the LeaseDB (#666).

comment:2 Changed at 2012-09-28T01:55:34Z by davidsarah

Straw-man signature:

def add_or_renew_leases(storage_index=StorageIndex,
                        sharenums=SetOf(int, maxLength=MAX_BUCKETS),
                        requested_duration_seconds=int)
    """
    Renew leases on the specified shares, or add them where there is no existing
    lease, requesting the given lease duration in seconds. Raise IndexError (and
    do not renew any leases) if any of the specified shares are not held by this
    server.

    Returns the lease duration accepted by the server, in seconds, which may be
    smaller than the requested duration. (This value does not take into account
    that existing leases on one of more of the specified shares, added by this or
    other accounts, may have a longer duration.)

    Server expiration policy might result in shares being deleted before the
    accepted lease duration returned by this method, but this should not normally
    happen without intervention to change the configured policy (for this account
    or globally), or to explicitly delete shares.

    This method was added in Tahoe-LAFS v1.X.0. For backward compatibility with
    older servers, use remote_add_lease (which will also renew existing leases).
    """
    return int
Last edited at 2012-09-28T03:27:39Z by davidsarah (previous) (diff)

comment:3 Changed at 2012-09-28T01:59:43Z by davidsarah

  • Keywords design-review-needed added
  • Owner set to warner

comment:4 Changed at 2012-09-28T03:25:55Z by davidsarah

  • Description modified (diff)
Note: See TracTickets for help on using tickets.