Commit Graph

138 Commits

Author SHA1 Message Date
Itamar Turner-Trauring
4c11177387 Fix a problem with typechecking.
Using remote_write() isn't quite right given move to HTTP, but can fight that
battle another day.
2021-11-18 15:58:55 -05:00
Itamar Turner-Trauring
e2636466b5 Fix a flake. 2021-11-18 15:47:25 -05:00
Itamar Turner-Trauring
5d915afe1c Clean up BucketWriters on shutdown (also preventing DelayedCalls leaks in tests). 2021-11-18 15:42:54 -05:00
Itamar Turner-Trauring
8c8e377466 Implement timeout and corresponding tests. 2021-11-18 14:35:04 -05:00
Itamar Turner-Trauring
45c00e93c9 Use clock in BucketWriter. 2021-11-17 11:12:40 -05:00
Itamar Turner-Trauring
92c36a67d8 Use IReactorTime instead of ad-hoc solutions. 2021-11-17 11:01:04 -05:00
Jean-Paul Calderone
84c19f5468 clarify renew_leases docs on slot_testv_and_readv_and_writev 2021-11-15 08:12:07 -05:00
Jean-Paul Calderone
ad6017e63d clarify renew_leases docs on allocate_buckets 2021-11-15 08:11:53 -05:00
Jean-Paul Calderone
85977e48a7 put this comment back and merge info from the two versions 2021-11-12 16:23:15 -05:00
Jean-Paul Calderone
c3cb0ebaea Switch to per-call parameter for controlling lease renewal behavior
This is closer to an implementation where you could have two frontends, say a
Foolscap frontend and an HTTP frontend or even just two different HTTP
frontends, which had different opinions about what the behaviour should be.
2021-11-12 16:20:27 -05:00
Jean-Paul Calderone
2742de6f7c drop some ancient cruft
allocated_size not used anywhere, so why have it
2021-11-10 16:08:53 -05:00
Jean-Paul Calderone
9af81d21c5 add a way to turn off implicit bucket lease renewal too 2021-11-10 16:08:40 -05:00
Jean-Paul Calderone
7335b2a597 remove unused import 2021-11-03 13:16:15 -04:00
Jean-Paul Calderone
b5f882ffa6 introduce and use LeaseInfo.is_cancel_secret 2021-10-28 15:21:51 -04:00
Jean-Paul Calderone
8b976b441e add LeaseInfo.is_renew_secret and use it 2021-10-28 15:21:51 -04:00
Jean-Paul Calderone
78dbe76994 remove unused import 2021-10-28 15:20:44 -04:00
Jean-Paul Calderone
1b46ac7a24 add MutableShareFile.is_valid_header and use it 2021-10-28 11:38:18 -04:00
Jean-Paul Calderone
66845c9a17 Add ShareFile.is_valid_header and use it instead of manual header inspection 2021-10-28 11:12:20 -04:00
Jean-Paul Calderone
65d3ab6142 move backdating logic into mutable/immutable share files 2021-10-28 10:53:52 -04:00
Jean-Paul Calderone
3514995068 some versions of mypy don't like this so nevermind 2021-10-28 10:26:30 -04:00
Jean-Paul Calderone
76caf46347 make the alternate LeaseInfo constructors into class methods 2021-10-28 10:23:58 -04:00
Jean-Paul Calderone
70fb5d563a Get rid of the public expiration_time attribute
LeaseInfo now has a getter and a setter for this attribute.
LeaseInfo is now also immutable by way of `attrs`.
LeaseInfo is now also comparable by way of `attrs`.
2021-10-28 09:48:26 -04:00
Itamar Turner-Trauring
016d6b4530 Fix spurious type checking error. 2021-09-29 14:10:14 -04:00
Itamar Turner-Trauring
58d7e2f627 Simplify implementation. 2021-09-29 13:58:53 -04:00
Itamar Turner-Trauring
8fb6afee1b Refactor BucketWriters such that disconnection can be limited Foolscap. 2021-09-29 13:42:17 -04:00
Itamar Turner-Trauring
a4153b7125 Implementation plan. 2021-09-29 11:56:04 -04:00
Itamar Turner-Trauring
fadfbcad99
Merge pull request #1130 from tahoe-lafs/3801-no-overlapping-writes-immutable-upload
Disallow conflicting overlapping writes when doing an immutable upload.

Fixes ticket:3801
2021-09-28 10:37:56 -04:00
Itamar Turner-Trauring
0b1082fc04 Fix lint. 2021-09-24 12:04:12 -04:00
Itamar Turner-Trauring
6ef3811112 Prevent conflicting overlapping writes. 2021-09-24 11:54:08 -04:00
Itamar Turner-Trauring
1ff4e61e41 Low-level tests for conflicting and non-conflicting writes. 2021-09-24 10:49:27 -04:00
Itamar Turner-Trauring
911a5e2ed1 Rip out server-side usage of operators other than eq, because nothing ever used them. 2021-09-15 11:07:02 -04:00
Itamar Turner-Trauring
148a0573de Replace colon on filename only, not on whole path.
This would break Windows logging of corruption reports, since colon would be removed from e.g. "C:".
2021-09-03 13:11:02 -04:00
Itamar Turner-Trauring
7d32335353 Clarify and remove duplication. 2021-08-30 16:49:11 -04:00
Itamar Turner-Trauring
d599568c79 Tests validating that the operation for adding a lease will renew the lease
instead if it already exists.
2021-08-19 13:56:13 -04:00
Itamar Turner-Trauring
dfff187ad0 Make time pluggable to support better testing. 2021-08-19 13:23:01 -04:00
Itamar Turner-Trauring
3f98349cd9 Limit Pickle protocol to version supported by Python 2. 2021-06-16 11:53:25 -04:00
Itamar Turner-Trauring
c5a426b797 More unicode-of-bytes fixes. 2021-02-12 11:47:11 -05:00
Itamar Turner-Trauring
a06956632b More unicode-of-bytes bug fixes. 2021-02-12 11:37:43 -05:00
Jason R. Coombs
5396f9f97e Replace fixme with reference to foolscap issue. 2020-12-26 12:02:47 -05:00
Jason R. Coombs
6ba7533168 Ignore failure on StorageServer.slot_testv_and_readv_and_writev, the implementation of which deviates from the interface spec substantially. 2020-11-29 14:04:59 -05:00
Jason R. Coombs
4998c4693f Ignore type checks on Referenceable objects. Ref warner/foolscap#78. 2020-11-29 13:57:46 -05:00
Jason R. Coombs
25cce8b77e Suppress typing errors in fileutil, crawler, fixups. 2020-11-29 13:57:46 -05:00
Itamar Turner-Trauring
5cd00d6f2e And even more tests passing in Python 3. 2020-09-24 10:55:47 -04:00
Itamar Turner-Trauring
03fd566e2c Fix flake error. 2020-09-17 12:37:10 -04:00
Itamar Turner-Trauring
e8743a607f Fix failing tests. 2020-09-16 14:37:16 -04:00
Itamar Turner-Trauring
b4116239b5 Merge remote-tracking branch 'origin/master' into 3415.storage-server-python-3 2020-09-16 11:27:03 -04:00
Itamar Turner-Trauring
a552bb53a7 Merge remote-tracking branch 'origin/master' into 3409.allmydata-storage-immutable-python-3 2020-09-15 09:05:55 -04:00
Itamar Turner-Trauring
65d38055e4 Merge branch '3409.allmydata-storage-immutable-python-3' into 3415.storage-server-python-3 2020-09-14 14:48:24 -04:00
Itamar Turner-Trauring
31aa594290 Looks like float is fine for mean. 2020-09-14 14:47:26 -04:00
Itamar Turner-Trauring
d84a7a61f3 Port to Python 3. 2020-09-14 14:46:08 -04:00