antirez
c1cb2ae695
Threaded IO: allow to disable debug printf.
2019-05-06 18:02:51 +02:00
antirez
62261aa905
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
179c89c6a4
Merge pull request #5971 from devnexen/unstable
...
build fix
2019-04-26 17:32:21 +02:00
David Carlier
0e00a99f32
build fix
2019-03-28 06:38:16 +00:00
Oran Agra
48d14e5aa7
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
eb40ac6c8e
diskless fork kept streaming RDB to a disconnected slave
2019-03-21 20:24:52 +02:00
antirez
2fd9b52b42
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
8b01d81fd4
Merge branch 'gopher' into unstable
2019-02-25 18:16:58 +01:00
antirez
43b7a5fa1c
RESP3: SETNAME option for HELLO.
2019-02-25 16:56:58 +01:00
antirez
ea75d7d52b
RESP3: AUTH option for HELLO.
2019-02-25 16:55:16 +01:00
antirez
17e9ec2a69
RESP3: refactoring of CLIENT SETNAME to implement SETNAME in HELLO.
2019-02-25 16:51:49 +01:00
antirez
505815da4b
RESP3: allow HELLO to be used with version = 2.
2019-02-25 16:41:00 +01:00
antirez
dec44d23d3
ACL: move AUTH implementation in acl.c.
2019-02-25 16:33:38 +01:00
antirez
c8b67fea44
Gopher: initial request handling.
2019-02-21 23:13:08 +01:00
Madelyn Olson
79eaa9ebd9
Refactored manual computation of object length
2019-02-21 21:35:00 +00:00
antirez
34f11c811d
ACL: when client->user is NULL the client is a superuser.
...
Related to #5832 .
2019-02-12 09:44:30 +01:00
zhaozhao.zz
9150d9246e
ACL: show client's user
2019-02-12 16:03:58 +08:00
antirez
a5e69e6729
ACL: remove server.requirepass + some refactoring.
2019-01-18 11:49:30 +01:00
antirez
8ea6409e38
ACL: automatically authenticate the nopass default user.
2019-01-15 17:57:49 +01:00
antirez
8df5007346
ACL: avoid a radix tree lookup for the default user.
2019-01-11 11:32:41 +01:00
antirez
33ff2b2f35
ACL: add a reference to the user in each client.
2019-01-10 16:34:13 +01:00
antirez
8cff8ef2d3
ACL: HELLO should stop if the user is not authenticated.
2019-01-09 17:00:30 +01:00
antirez
89b7b6a917
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
78a3a19b2c
RESP3: verbatim reply API + DEBUG PROTOCOL support.
2019-01-09 17:00:30 +01:00
antirez
6525bd9f68
RESP3: Fix addReplyBool() RESP2/3 output.
2019-01-09 17:00:30 +01:00
antirez
a6ead03510
RESP3: addReplyBool() implemented.
2019-01-09 17:00:29 +01:00
antirez
bf3d7bbf31
RESP3: initial implementation of the HELLO command.
2019-01-09 17:00:29 +01:00
antirez
8ecf7693bf
RESP3: addReplyNullArray() added for better RESP2 compat.
2019-01-09 17:00:29 +01:00
antirez
c8304b099d
RESP3: most null replies converted.
2019-01-09 17:00:29 +01:00
antirez
29bbe91392
RESP3: addReplyNull() added.
2019-01-09 17:00:29 +01:00
antirez
56c95799a3
RESP3: bring RESP2 compatibility to previous changes.
2019-01-09 17:00:29 +01:00
antirez
e6a467814a
RESP3: addReply*Len() support for RESP2 backward comp.
2019-01-09 17:00:29 +01:00
antirez
9325d288f6
RESP3: put RESP version in the client structure.
2019-01-09 17:00:29 +01:00
antirez
689949fb30
RESP3: Aggregate deferred lengths functions.
2019-01-09 17:00:29 +01:00
antirez
7b7a468949
RESP3: Double replies and aggregate lengths initial functions.
2019-01-09 17:00:29 +01:00
antirez
93f443510b
Crashing is too much in addReplyErrorLength().
...
See #5663 .
2018-12-11 17:50:18 +01:00
zhaozhao.zz
000eb0fcec
networking: current_client should not be NULL when trim qb_pos
2018-12-07 19:14:33 +08:00
Madelyn Olson
e2f8bebfbb
Fixed a serverPanic when sending an invalid command to a monitor client
2018-12-04 07:17:17 +00:00
antirez
5789a7ef6d
asyncCloseClientOnOutputBufferLimitReached(): don't free fake clients.
...
Fake clients are used in special situations and are not linked to the
normal clients list, freeing them will always result in Redis crashing
in one way or the other.
It's not common to send replies to fake clients, but we have one usage
in the modules API. When a client is blocked, we associate to the
blocked client object (that is safe to manipulate in a thread), a fake
client that accumulates replies. So because of this bug there was
the problem described in issue #5443 .
The fix was verified to work with the provided example module. To write
a regression is very hard and unlikely to be triggered in the future.
2018-10-30 13:38:41 +01:00
zhaozhao.zz
138e48f940
Avoid recreate write handler for protected client.
2018-10-09 20:34:11 +08:00
antirez
b6b7304f00
Free protected clients asynchronously.
...
Related to #4840 .
Note that when we re-enter the event loop with aeProcessEvents() we
don't process timers, nor before/after sleep callbacks, so we should
never end calling freeClientsInAsyncFreeQueue() when re-entering the
loop.
2018-10-09 13:28:51 +02:00
antirez
4e851f8044
Introduce protectClient() + some refactoring.
...
The idea is to have an API for the cases like -BUSY state and DEBUG
RELOAD where we have to manually deinstall the read handler.
See #4804 .
2018-10-09 13:15:41 +02:00
antirez
04d65fc559
Slave removal: networking.c logs fixed.
2018-09-11 15:32:28 +02:00
antirez
dcdcbcc375
Slave removal: slave -> replica in redis.conf and output buffer option.
2018-09-11 15:32:28 +02:00
antirez
5fda4a85dd
Clarify why remaining may be zero in readQueryFromClient().
...
See #5304 .
2018-09-04 13:29:27 +02:00
Salvatore Sanfilippo
3bde684596
Merge pull request #5304 from soloestoy/fix-unexpected-readlen
...
networking: fix unexpected negative or zero readlen
2018-09-04 13:25:28 +02:00
Salvatore Sanfilippo
65b7c53e0d
Merge pull request #5315 from soloestoy/optimize-parsing-large-bulk
...
networking: optimize parsing large bulk greater than 32k
2018-09-04 12:49:50 +02:00
antirez
02306736c9
Unblocked clients API refactoring. See #4418 .
2018-09-03 18:39:18 +02:00
Salvatore Sanfilippo
590b3157d4
Merge pull request #4418 from soloestoy/fix-multiple-unblock
...
fix multiple unblock for clientsArePaused()
2018-09-03 18:31:02 +02:00
antirez
f0348a6543
Make pending buffer processing safe for CLIENT_MASTER client.
...
Related to #5305 .
2018-09-03 18:17:31 +02:00