Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
ZKAPAuthorizer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Administrator
ZKAPAuthorizer
Commits
fcf09632
Commit
fcf09632
authored
3 years ago
by
Jean-Paul Calderone
Browse files
Options
Downloads
Patches
Plain Diff
update to the API that actually landed in Tahoe-LAFS master
parent
6e1f47f1
No related branches found
Branches containing commit
No related tags found
1 merge request
!248
Turn off implicit lease renewal for allocate_buckets
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/_zkapauthorizer/_storage_server.py
+13
-12
13 additions, 12 deletions
src/_zkapauthorizer/_storage_server.py
with
13 additions
and
12 deletions
src/_zkapauthorizer/_storage_server.py
+
13
−
12
View file @
fcf09632
...
...
@@ -176,12 +176,6 @@ class ZKAPAuthorizerStorageServer(Referenceable):
default
=
attr
.
Factory
(
partial
(
namedAny
,
"
twisted.internet.reactor
"
)),
)
def
__attrs_post_init__
(
self
):
# Avoid the default StorageServer ``allocate_buckets`` behavior of
# renewing leases on all existing shares in the same bucket. It will
# still add leases to the newly uploaded shares.
self
.
_original
.
set_implicit_bucket_lease_renewal
(
False
)
def
remote_get_version
(
self
):
"""
Pass-through without pass check to allow clients to learn about our
...
...
@@ -236,14 +230,23 @@ class ZKAPAuthorizerStorageServer(Referenceable):
allocated_size
,
)
return
self
.
_original
.
remote
_allocate_buckets
(
alreadygot
,
bucketwriters
=
self
.
_original
.
_allocate_buckets
(
storage_index
,
renew_secret
,
cancel_secret
,
sharenums
,
allocated_size
,
canary
,
renew_leases
=
False
,
)
# Copy/paste the disconnection handling logic from
# StorageServer.remote_allocate_buckets.
for
bw
in
bucketwriters
.
values
():
disconnect_marker
=
canary
.
notifyOnDisconnect
(
bw
.
disconnected
)
self
.
_original
.
_bucket_writer_disconnect_markers
[
bw
]
=
(
canary
,
disconnect_marker
,
)
return
alreadygot
,
bucketwriters
def
remote_get_buckets
(
self
,
storage_index
):
"""
...
...
@@ -370,17 +373,15 @@ class ZKAPAuthorizerStorageServer(Referenceable):
if
required_new_passes
>
len
(
validation
.
valid
):
validation
.
raise_for
(
required_new_passes
)
self
.
_original
.
set_implicit_slot_lease_renewal
(
renew_leases
)
# Skip over the remotely exposed method and jump to the underlying
# implementation which accepts one additional parameter that we know
# about (and don't expose over the network): renew_leases. We always
# pass False for this because we want to manage leases completely
# separately from writes.
# about (and don't expose over the network): renew_leases.
return
self
.
_original
.
slot_testv_and_readv_and_writev
(
storage_index
,
secrets
,
tw_vectors
,
r_vector
,
renew_leases
=
renew_leases
,
)
def
remote_slot_readv
(
self
,
*
a
,
**
kw
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment