diff --git a/src/_zkapauthorizer/_plugin.py b/src/_zkapauthorizer/_plugin.py index 3d5dec0ca9d54a12dce338cd797bead5d24e252a..caa0906615d615fe04f433723eee81a83b8ee2f3 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,