minio/pkg
Harshavardhana 0104af6bcc
delayed locks until we have started reading the body (#10474)
This is to ensure that Go contexts work properly, after some
interesting experiments I found that Go net/http doesn't
cancel the context when Body is non-zero and hasn't been
read till EOF.

The following gist explains this, this can lead to pile up
of go-routines on the server which will never be canceled
and will die at a really later point in time, which can
simply overwhelm the server.

https://gist.github.com/harshavardhana/c51dcfd055780eaeb71db54f9c589150

To avoid this refactor the locking such that we take locks after we
have started reading from the body and only take locks when needed.

Also, remove contextReader as it's not useful, doesn't work as expected
context is not canceled until the body reaches EOF so there is no point
in wrapping it with context and putting a `select {` on it which
can unnecessarily increase the CPU overhead.

We will still use the context to cancel the lockers etc.
Additional simplification in the locker code to avoid timers
as re-using them is a complicated ordeal avoid them in
the hot path, since locking is very common this may avoid
lots of allocations.
2020-09-14 15:57:13 -07:00
..
auth fix: remove LDAP groups claim and store them on server (#9637) 2020-05-20 11:33:35 -07:00
bpool Replace Minio refs in docs with MinIO and links (#7494) 2019-04-09 11:39:42 -07:00
bucket lifecycle: NoncurrentVersionExpiration considers noncurrent version age (#10444) 2020-09-09 18:11:24 -07:00
certs certs: refactor cert manager to support multiple certificates (#10207) 2020-09-03 23:33:37 -07:00
cgroup Replace Minio refs in docs with MinIO and links (#7494) 2019-04-09 11:39:42 -07:00
color Bring in safe mode support (#8478) 2019-11-09 09:27:23 -08:00
console simplify usage of mutexes and atomic constants (#9501) 2020-05-03 22:35:40 -07:00
csvparser sql, csv: Cache some values between Read() calls to gain performance (#9645) 2020-05-22 10:15:08 -07:00
disk add ruleguard support, fix all the reported issues (#10335) 2020-08-24 12:11:20 -07:00
dsync delayed locks until we have started reading the body (#10474) 2020-09-14 15:57:13 -07:00
ellipses Replace Minio refs in docs with MinIO and links (#7494) 2019-04-09 11:39:42 -07:00
env Add Kubernetes operator webook server as DNS target (#10404) 2020-09-09 12:20:49 -07:00
event fix nats TLS unit tests (#10476) 2020-09-14 13:19:46 -07:00
handlers Reroute requests based token heal/listing (#9939) 2020-07-03 11:53:03 -07:00
hash add comment on exported error 2020-05-15 18:17:54 -07:00
iam/policy add missing ListBucketVersions from policy actions (#10414) 2020-09-03 18:25:06 -07:00
ioutil add additional fdatasync before close() on writes (#9947) 2020-07-01 10:57:23 -07:00
licverifier Add ExpiresAt to LicenseInfo (#10293) 2020-08-19 19:21:04 -07:00
lock re-implement data usage crawler to be more efficient (#9075) 2020-03-18 16:19:29 -07:00
lsync delayed locks until we have started reading the body (#10474) 2020-09-14 15:57:13 -07:00
madmin Remove MaxConnsPerHost settings to avoid potential hangs (#10438) 2020-09-08 14:22:04 -07:00
mimedb Replace Minio refs in docs with MinIO and links (#7494) 2019-04-09 11:39:42 -07:00
mountinfo Cache Windows mount point info (#8572) 2019-11-27 20:10:13 +05:30
net fix: re-use connections in webhook/elasticsearch (#9461) 2020-04-28 13:57:56 -07:00
pubsub Avoid healing to be stuck with many concurrent event listeners (#10111) 2020-07-22 13:16:55 -07:00
quick fix: migrate to go.etcd.io import path (#9987) 2020-07-07 19:04:29 -07:00
retry fix: for defer'ed deleteObject use internal context (#10463) 2020-09-11 06:39:19 -07:00
s3select select: Fix integer conversion overflow (#10437) 2020-09-08 15:56:11 -07:00
safe Replace Minio refs in docs with MinIO and links (#7494) 2019-04-09 11:39:42 -07:00
sync/errgroup Replace Minio refs in docs with MinIO and links (#7494) 2019-04-09 11:39:42 -07:00
sys add ruleguard support, fix all the reported issues (#10335) 2020-08-24 12:11:20 -07:00
trace feat: time to bring back http2.0 support (#10230) 2020-08-10 09:02:29 -07:00
trie Replace Minio refs in docs with MinIO and links (#7494) 2019-04-09 11:39:42 -07:00
wildcard Simplify cast of string to rune slice in wildcard matching (#9577) 2020-05-14 08:20:13 -07:00
words Replace Minio refs in docs with MinIO and links (#7494) 2019-04-09 11:39:42 -07:00