zhaozhao.zz
8b33975944
Threaded IO: use main thread to handle write work
2019-05-21 11:37:13 +08:00
antirez
9724ca4e22
Make comment in getClientOutputBufferMemoryUsage() describing the present.
2019-05-13 17:30:06 +02:00
antirez
3d053dbb6d
Threaded IO: handleClientsWithPendingReadsUsingThreads top comment.
2019-05-06 18:02:51 +02:00
antirez
1c0c436757
Threaded IO: ability to disable reads from threaded path.
2019-05-06 18:02:51 +02:00
antirez
90d720e7a5
Threaded IO: put fflush() inside tio_debug conditional.
2019-05-06 18:02:51 +02:00
antirez
6ab6a97fe6
Threaded IO: parsing WIP 2: refactoring to parse from thread.
2019-05-06 18:02:51 +02:00
antirez
647a66ebba
Threaded IO: parsing WIP 1: set current_client in a better scoped way.
2019-05-06 18:02:51 +02:00
antirez
463ccf8664
Threaded IO: logging should be safe in I/O threads.
...
Potentially it is possible that we get interleaved writes, even if
serverLog() makes sure to write into a buffer and then use printf(), so
even this should be ok. However in general POSIX guarantees that writing
to the same file pointer object from multiple threads is safe. Anyway
currently we *reopen* the file at each call, but for the standard output
logging.
The logging functions actually also access global configuration while
performing the log (for instance in order to check the log level, the
log filename and so forth), however dunring the I/O threads execution
we cannot alter such shared state in any way.
2019-05-06 18:02:51 +02:00
antirez
8d7d2be24f
Threaded IO: process read queue before stopping threads.
2019-05-06 18:02:51 +02:00
antirez
63a0ffd36a
Threaded IO: read side WIP 3.
2019-05-06 18:02:51 +02:00
antirez
a2245f8ff1
Threaded IO: read side WIP 2.
2019-05-06 18:02:51 +02:00
antirez
dd5b105c73
Threaded IO: read side WIP.
2019-05-06 18:02:51 +02:00
antirez
74591fb5bd
Threaded IO: hide more debugging printfs under conditional.
2019-05-06 18:02:51 +02:00
antirez
9814b2a5f3
Threaded IO: make num of I/O threads configurable.
2019-05-06 18:02:51 +02:00
antirez
30091dc29f
Threaded IO: use main thread if num of threads is 1.
2019-05-06 18:02:51 +02:00
Ubuntu
9bf7f302a7
Threaded IO: stop threads when no longer needed + C11 in Makefile.
...
Now threads are stopped even when the connections drop immediately to
zero, not allowing the networking code to detect the condition and stop
the threads. serverCron() will handle that.
2019-05-06 18:02:51 +02:00
antirez
ea35a81c42
Threaded IO: 3rd version: use the mutex only to stop the thread.
2019-05-06 18:02:51 +02:00
antirez
6f4f36c0fb
Threaded IO: second attempt without signaling conditions.
2019-05-06 18:02:51 +02:00
antirez
a2dbd9bd97
Threaded IO: allow to disable debug printf.
2019-05-06 18:02:51 +02:00
antirez
f468e653b5
Threaded IO: implement handleClientsWithPendingWritesUsingThreads().
...
This is just an experiment for now, there are a couple of race
conditions, mostly harmless for the performance gain experiment that
this commit represents so far.
The general idea here is to take Redis single threaded and instead
fan-out on expansive kernel calls: write(2) in this case, but the same
concept could be easily implemented for read(2) and protcol parsing.
However just threading writes like in this commit, is enough to evaluate
if the approach is sounding.
2019-05-06 18:02:51 +02:00
Salvatore Sanfilippo
843de8b786
Merge pull request #5971 from devnexen/unstable
...
build fix
2019-04-26 17:32:21 +02:00
David Carlier
4de88828d9
build fix
2019-03-28 06:38:16 +00:00
Oran Agra
acba2fc9b4
slave corrupts replication stream when module blocked client uses large reply (or POSTPONED_ARRAY)
...
when redis appends the blocked client reply list to the real client, it didn't
bother to check if it is in fact the master client. so a slave executing that
module command will send replies to the master, causing the master to send the
slave error responses, which will mess up the replication offset
(slave will advance it's replication offset, and the master does not)
2019-03-24 14:17:37 +02:00
Oran Agra
29b0a57695
diskless fork kept streaming RDB to a disconnected slave
2019-03-21 20:24:52 +02:00
antirez
68c75f248e
Gopher: reply in gopher mode only if argv[0] starts with slash.
...
As documented but never implemented.
2019-02-27 22:20:31 +01:00
antirez
a7780f716e
Merge branch 'gopher' into unstable
2019-02-25 18:16:58 +01:00
antirez
21f92e9e34
RESP3: SETNAME option for HELLO.
2019-02-25 16:56:58 +01:00
antirez
d4d15315a8
RESP3: AUTH option for HELLO.
2019-02-25 16:55:16 +01:00
antirez
5748439770
RESP3: refactoring of CLIENT SETNAME to implement SETNAME in HELLO.
2019-02-25 16:51:49 +01:00
antirez
3b420034bb
RESP3: allow HELLO to be used with version = 2.
2019-02-25 16:41:00 +01:00
antirez
87594a7470
ACL: move AUTH implementation in acl.c.
2019-02-25 16:33:38 +01:00
antirez
e00b22e090
Gopher: initial request handling.
2019-02-21 23:13:08 +01:00
Madelyn Olson
9131fc56d6
Refactored manual computation of object length
2019-02-21 21:35:00 +00:00
antirez
d5e4a7f439
ACL: when client->user is NULL the client is a superuser.
...
Related to #5832 .
2019-02-12 09:44:30 +01:00
zhaozhao.zz
0f42447a0e
ACL: show client's user
2019-02-12 16:03:58 +08:00
antirez
c8391388c2
ACL: remove server.requirepass + some refactoring.
2019-01-18 11:49:30 +01:00
antirez
35fe59935e
ACL: automatically authenticate the nopass default user.
2019-01-15 17:57:49 +01:00
antirez
aced0328e3
ACL: avoid a radix tree lookup for the default user.
2019-01-11 11:32:41 +01:00
antirez
4278104acc
ACL: add a reference to the user in each client.
2019-01-10 16:34:13 +01:00
antirez
f5d918b2bb
ACL: HELLO should stop if the user is not authenticated.
2019-01-09 17:00:30 +01:00
antirez
709a6612eb
RESP3: addReplyString() -> addReplyProto().
...
The function naming was totally nuts. Let's fix it as we break PRs
anyway with RESP3 refactoring and changes.
2019-01-09 17:00:30 +01:00
antirez
e291170385
RESP3: verbatim reply API + DEBUG PROTOCOL support.
2019-01-09 17:00:30 +01:00
antirez
8042afb246
RESP3: Fix addReplyBool() RESP2/3 output.
2019-01-09 17:00:30 +01:00
antirez
809e3a44a7
RESP3: addReplyBool() implemented.
2019-01-09 17:00:29 +01:00
antirez
4f0860cbfd
RESP3: initial implementation of the HELLO command.
2019-01-09 17:00:29 +01:00
antirez
1a17cdfadf
RESP3: addReplyNullArray() added for better RESP2 compat.
2019-01-09 17:00:29 +01:00
antirez
317f8b9d38
RESP3: most null replies converted.
2019-01-09 17:00:29 +01:00
antirez
1b7298e66a
RESP3: addReplyNull() added.
2019-01-09 17:00:29 +01:00
antirez
13966522ea
RESP3: bring RESP2 compatibility to previous changes.
2019-01-09 17:00:29 +01:00
antirez
e14aabf936
RESP3: addReply*Len() support for RESP2 backward comp.
2019-01-09 17:00:29 +01:00