From b8e5c9ee6243b4b08f3df5d28d83589421f3fa1f Mon Sep 17 00:00:00 2001 From: Jean-Paul Calderone <exarkun@twistedmatrix.com> Date: Mon, 2 Aug 2021 10:17:52 -0400 Subject: [PATCH] try to justify our seconds=0 value --- src/_zkapauthorizer/_plugin.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/_zkapauthorizer/_plugin.py b/src/_zkapauthorizer/_plugin.py index 3d5dec0..caa0906 100644 --- a/src/_zkapauthorizer/_plugin.py +++ b/src/_zkapauthorizer/_plugin.py @@ -266,7 +266,19 @@ def _create_maintenance_service(reactor, node_config, client_node): get_root_nodes=partial(get_root_nodes, client_node, node_config), storage_broker=client_node.get_storage_broker(), secret_holder=client_node._secret_holder, - # Make this configuration + # The greater the min lease remaining time, the more of each lease + # period is "wasted" by renewing the lease before it has expired. The + # premise of ZKAPAuthorizer's use of leases is that if they expire, + # the storage server is free to reclaim the storage by forgetting + # about the share. However, since we do not know of any + # ZKAPAuthorizer-enabled storage grids which will garbage collect + # shares when leases expire, we have no reason not to use a zero + # duration here - for now. + # + # In the long run, storage servers must run with garbage collection + # enabled. Ideally, before that happens, we will have a system that + # doesn't involve trading of wasted lease time against reliability of + # leases being renewed before the shares are garbage collected. min_lease_remaining=timedelta(seconds=0), progress=store.start_lease_maintenance, get_now=get_now, -- GitLab