Add http storage timeouts #1227
No reviewers
Labels
No Label
Benchmarking and Performance
HTTP Storage Protocol
Nevow Removal
Python 3 Porting
not-for-merge
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: tahoe-lafs/tahoe-lafs#1227
Loading…
Reference in New Issue
No description provided.
Delete Branch "3940-http-timeouts"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes https://tahoe-lafs.org/trac/tahoe-lafs/ticket/3940
Also this has some fixes for the intermittent dirty reactor timeouts, and workaround for Tor integration test issues that started failing when GitHub Actions switched
ubuntu-latest
to 22.04 (I have filed an issue: https://tahoe-lafs.org/trac/tahoe-lafs/ticket/3943)Coverage remained the same at 94.699% when pulling
aa80c9ef47
on 3940-http-timeouts intoac524a3077
on master.Thanks! Some comments inline. Please address and merge when you are satisfied.
Does the timeout DelayedCall leak if there is an error while collecting the response?
@ -372,2 +373,4 @@
with CBOR) and set as the request body.
Default timeout is 60 seconds.
"""
mypy considers int to be a subclass of float, so
timeout: float = 60
is fineMaybe it should be
clock
instead of_clock
Or
StorageClient
could offer a higher-level interface likeself._client.decode_response(new_decode_cbor)
that takes responsibility for managing the timeout and then the cbor (and other) decoders can remain ignorant of time.Or maybe
StorageClientGeneral
could just have a direct reference to a clock.Maybe you can use
reactor._internalReaders
as a slightly more robust abstraction violation. Some of these classes might have their names changed in an upcoming Twisted release...It's hard to love
spin_until_cleanup_done
but this new line is clearly less bad than the old line.I suppose
AsyncTestCase.tearDown(self)
might return aDeferred
too.At the moment it does not. But I could add a maybeDeferred I guess.
Fixed.
I moved the CBOR decoding code into method of StorageClient.