1
1
mirror of https://github.com/go-gitea/gitea synced 2024-12-25 01:54:26 +00:00
gitea/modules
zeripath f034804e5d
Set self-adjusting deadline for connection writing (#16068) (#16123)
In #16055 it appears that the simple 5s deadline doesn't work for large
file writes. Now we can't - or at least shouldn't just set no deadline
as go will happily let these connections block indefinitely. However,
what seems reasonable is to set some minimum rate we expect for writing.

This PR suggests the following algorithm:

* Every write has a minimum timeout of 5s (adjustable at compile time.)
* If there has been a previous write - then consider its previous
deadline, add half of the minimum timeout + 2s per kb about to written.
* If that new deadline is after the minimum timeout use that.

Fix #16055

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: 6543 <6543@obermui.de>
2021-06-11 00:26:32 +03:00
..
analyze Speed up enry.IsVendor (#15213) (#15245) 2021-04-02 01:16:00 +02:00
auth Add SameSite setting for cookies (#14900) 2021-03-07 08:12:43 +00:00
avatar Avatars and Repo avatars support storing in minio (#12516) 2020-10-14 21:07:51 +08:00
base fix truncate utf8 string (#15828) (#15854) 2021-05-13 16:10:29 +02:00
cache [Vendor] Update go-redis to v8.5.0 (#13749) 2021-02-10 21:28:32 +00:00
charset Ensure that the detected charset order is set in chardet test (#12574) 2020-08-23 14:15:29 +01:00
context Stop calling WriteHeader in Write (#15862) (#15873) 2021-05-14 15:38:35 +01:00
convert [API] pull notification subject status: add "merged" (#15344) (#15654) 2021-04-28 20:24:56 +01:00
cron Cron job to cleanup hook_task table (#13080) 2021-01-26 22:02:42 +01:00
doctor Add err to log (#15813) (#15824) 2021-05-10 16:38:37 -04:00
emoji Fix several render issues (#14986) 2021-03-16 00:20:05 +01:00
eventsource Migrate to use jsoniter instead of encoding/json (#14841) 2021-03-01 22:08:10 +01:00
forms Restore PAM user autocreation functionality (#15825) (#15867) 2021-05-19 10:42:36 -04:00
generate Add gitea-vet (#10948) 2020-04-05 07:20:50 +01:00
git git migration: don't prompt interactively for clone credentials (#15902) (#16082) 2021-06-06 14:02:34 +08:00
gitgraph Fix bug on commit graph (#15517) (#15530) 2021-04-17 14:46:30 +02:00
graceful Set self-adjusting deadline for connection writing (#16068) (#16123) 2021-06-11 00:26:32 +03:00
hcaptcha hCaptcha Support (#12594) 2020-10-02 23:37:53 -04:00
highlight Use existing analyzer module for language detection for highlighting (#13522) 2020-11-13 16:13:41 -05:00
httpcache Add ETag header (#15370) (#15552) 2021-04-20 12:01:58 -04:00
httplib fix webhook timeout bug (#15613) (#15621) 2021-04-26 14:42:12 +02:00
indexer If the default branch is not present do not report error on stats indexing (follow-up of #15546) (#15583) (#15594) 2021-04-22 22:30:18 +02:00
lfs Close file on invalid range (Addition to #15166) (#15268) (#15308) 2021-04-06 15:25:31 -04:00
log Migrate to use jsoniter instead of encoding/json (#14841) 2021-03-01 22:08:10 +01:00
markup Fix data URI scramble (#16098) (#16118) 2021-06-09 16:31:40 +02:00
matchlist Add Allow-/Block-List for Migrate & Mirrors (#13610) 2020-11-28 19:37:58 -05:00
metrics Prometheus endpoint (#5256) 2018-11-04 22:20:00 -05:00
migrations GitHub: migrate draft releases too (#15884) (#15888) 2021-05-16 09:24:28 +02:00
nosql Fix setting redis db path (#15698) (#15708) 2021-05-03 22:30:30 +01:00
notification Don't manipulate input params in email notification (#16011) (#16033) 2021-05-31 02:17:34 -04:00
options Add StatDir and replace com.StatDir (#14099) 2020-12-22 07:40:57 +08:00
password Check passwords against HaveIBeenPwned (#12716) 2020-09-08 17:06:39 -05:00
pprof Add golangci (#6418) 2019-06-12 15:41:28 -04:00
private Move restore repo to internal router and invoke from command to avoid open the same db file or queues files (#15790) (#15816) 2021-05-10 21:14:59 +08:00
process Reduce data races (#14549) 2021-02-03 22:36:38 +01:00
public Add ETag header (#15370) (#15552) 2021-04-20 12:01:58 -04:00
queue Queue manager FlushAll can loop rapidly - add delay (#15733) (#15840) 2021-05-12 18:48:11 +01:00
recaptcha Migrate to use jsoniter instead of encoding/json (#14841) 2021-03-01 22:08:10 +01:00
references Add mentionable teams to tributeValues and change team mention rules to gh's style (#13198) 2020-12-21 16:39:28 +01:00
repofiles Remove possible resource leak (#15067) (#15082) 2021-03-21 17:07:37 +01:00
repository Set GIT_DIR correctly if it is not set (#15751) (#15769) 2021-05-07 20:01:25 +02:00
secret Attachments: Add extension support, allow all types for releases (#12465) 2020-10-05 01:49:33 -04:00
session Migrate to use jsoniter instead of encoding/json (#14841) 2021-03-01 22:08:10 +01:00
setting Set self-adjusting deadline for connection writing (#16068) (#16123) 2021-06-11 00:26:32 +03:00
ssh Set self-adjusting deadline for connection writing (#16068) (#16123) 2021-06-11 00:26:32 +03:00
storage Add size to Save function (#15264) (#15270) 2021-04-04 12:04:55 -04:00
structs Make manual merge autodetection optional and add manual merge as merge method (#12543) 2021-03-03 22:41:23 -05:00
svg Fix filepath basename on Windows for SVG bindata (#12241) 2020-07-13 21:16:40 +01:00
sync Fix missing unlock in uniquequeue (#9790) 2020-01-15 23:58:33 +02:00
task Migrate to use jsoniter instead of encoding/json (#14841) 2021-03-01 22:08:10 +01:00
templates Prevent incorrect HTML escaping in swagger.json (#14957) 2021-03-11 23:43:04 -05:00
test Move middlewares to web/middleware (#14480) 2021-01-30 10:55:53 +02:00
timeutil Fix display since time round (#14226) 2021-01-28 13:29:22 +01:00
translation Use index of the supported tags to choose user lang (#15452) (#15488) 2021-04-15 16:47:43 +02:00
upload Update golangci-lint to version 1.31.0 (#13102) 2020-10-11 21:27:20 +01:00
uri Dump github/gitlab/gitea repository data to a local directory and restore to gitea (#12244) 2020-12-27 11:34:19 +08:00
user Add gitea-vet (#10948) 2020-04-05 07:20:50 +01:00
util [API] Add pagination to ListBranches (#14524) 2021-02-03 20:06:13 +01:00
validation Move macaron to chi (#14293) 2021-01-26 16:36:53 +01:00
web Fix setting of SameSite on cookies (#15989) (#15991) 2021-05-27 10:02:39 -04:00