11613 Commits

Author SHA1 Message Date
John Sully
d57fa7c8f9 Merge commit '349aa24511253b3e323064b95cefb4414f31726c' into redis_6_merge
Former-commit-id: 28cbed1d13961c5568f2bdc50c6a23107d3434d0
2020-04-14 20:09:53 -04:00
John Sully
12999c17dd Merge commit 'df83892760d19b1b7e92d76e72daf4834ad2df6c' into redis_6_merge
Former-commit-id: cde199a7973ad63317b68f581df607321e12bf46
2020-04-14 19:43:04 -04:00
John Sully
947bf289a5 Merge commit 'f42ce57d0f7eee6705fb0a81714cabe97a4f2c0a' into redis_6_merge
Former-commit-id: 5589a0a69ca6f5798b750a6a79f7e9b44d20e136
2020-04-14 19:22:44 -04:00
John Sully
5dbcd55669 Merge commit '51c1a9f8fbc12a9276489178242e498bb6ccbdba' into redis_6_merge
Former-commit-id: 09e8fb17cd0889ad17461e48446221b3955f5a8f
2020-04-14 18:44:42 -04:00
John Sully
bd73ec5f1e Merge commit '6fe55c2f299bbb306533af39cb28346bf5d473d3' into redis_6_merge
Former-commit-id: d71c4c221580221c2c31b5e3b5d23bab50a544dc
2020-04-14 18:30:26 -04:00
John Sully
7ee5ad6430 Merge commit '721a39ddff0eb9be822d27dba80267f6da149aff' into redis_6_merge
Former-commit-id: 6f621e6480fd629593de8b264117a8b130b21175
2020-04-14 18:29:03 -04:00
John Sully
e751664909 Merge commit 'cbabf779c24fd107ca8e4fe6369e4677ad0eda10' into redis_6_merge
Former-commit-id: 8e33c2d30116ea469238c340ed367f0182856454
2020-04-14 18:05:10 -04:00
John Sully
8f4c9d6403 Merge commit 'ecd17e819cbb05110a49d81c6fda10e6770a7838' into redis_6_merge
Former-commit-id: 52aca124c30815fc1609ce2fb36081823ef5ddef
2020-04-14 18:04:51 -04:00
antirez
eafcca9f29 Jump to right label on AOF parsing error.
Related to #6054.


Former-commit-id: c7159d58f118e840a3b9f72160d1abf3e8a86b3d
2020-04-14 18:03:22 -04:00
antirez
0fac746f0e PSYNC2: meaningful offset implemented.
A very commonly signaled operational problem with Redis master-replicas
sets is that, once the master becomes unavailable for some reason,
especially because of network problems, many times it wont be able to
perform a partial resynchronization with the new master, once it rejoins
the partition, for the following reason:

1. The master becomes isolated, however it keeps sending PINGs to the
replicas. Such PINGs will never be received since the link connection is
actually already severed.
2. On the other side, one of the replicas will turn into the new master,
setting its secondary replication ID offset to the one of the last
command received from the old master: this offset will not include the
PINGs sent by the master once the link was already disconnected.
3. When the master rejoins the partion and is turned into a replica, its
offset will be too advanced because of the PINGs, so a PSYNC will fail,
and a full synchronization will be required.

Related to issue #7002 and other discussion we had in the past around
this problem.


Former-commit-id: 5d6e8fe3e3e43162f0c57f580b6e8432274fca30
2020-04-14 17:56:09 -04:00
Oran Agra
10a7bfe3a2 reduce repeated calls to use_diskless_load
this function possibly iterates on the module list


Former-commit-id: 99762dac23e26a217fcd66531ee4ca9b4d13a7ac
2020-04-14 17:34:36 -04:00
John Sully
f084ee6f17 Fix merge conflicts from cherry-pick
Former-commit-id: 57956b3fd2d05581c976f58d07e245896d3a515b
2020-04-14 17:33:54 -04:00
antirez
34f7c653d5 Remove RDB files used for replication in persistence-less instances.
Former-commit-id: b323645227a3e2cc5928e649586221aba508b10d
2020-04-14 17:27:05 -04:00
Johannes Truschnigg
1a078be843 Signal systemd readiness atfer Partial Resync
"Partial Resynchronization" is a special variant of replication success
that we have to tell systemd about if it is managing redis-server via a
Type=Notify service unit.


Former-commit-id: dd9502f373eb7e32aee69a30dcb521bea3ccd3ad
2020-04-14 17:22:30 -04:00
Guy Benoish
234e6e7b09 Diskless-load emptyDb-related fixes
1. Call emptyDb even in case of diskless-load: We want modules
   to get the same FLUSHDB event as disk-based replication.
2. Do not fire any module events when flushing the backups array.
3. Delete redundant call to signalFlushedDb (Called from emptyDb).


Former-commit-id: aa8a3077a2d20e66e34f72f2860d0cc3daad496e
2020-04-14 17:21:10 -04:00
John Sully
36c9a2c897 Cache fake client in replicaFeedSlaves
Former-commit-id: 8e81e5f29e718395b32a60ff263808305d0b5818
2020-04-13 22:45:15 -04:00
John Sully
2e4e4f4134 Don't do active replica work if we're not an active replica
Former-commit-id: 63dd1fb599cfe959c0298825ed56ab06335b3fd7
2020-04-13 22:35:06 -04:00
John Sully
d683a62b43 Optimize replicaFeedSlaves by removing use of snprintf
Former-commit-id: 32561a99124542461de283d5035f869b5fc9bc2f
2020-04-13 22:11:34 -04:00
John Sully
945f40c76a Fix failure to AUTH with master when masterauth is set last
Former-commit-id: 3fdc8608f35b9e333a1c789b039d16722a6ceef5
2020-04-06 01:24:59 -04:00
John Sully
6f15ce125c Add the ability to set a starting core # when setting thread affinity
Former-commit-id: 9e2e2067c6df5919f1c6b8b9e6e3457c7edc0755
2020-04-04 22:58:17 -04:00
John Sully
662a1b6a42 Fix issue #164
Former-commit-id: f112c77fcc3a60277ce344478bc37adb0fe4a99d
2020-04-04 22:45:12 -04:00
John Sully
de11140a17 Role command protocol corruption with multiple masters
Former-commit-id: 888d69a87a0076caa5b381d2531a6a638aa69051
2020-04-04 22:32:15 -04:00
John Sully
eeca58777d Fix subkey expires not replicating correctly, and AOF issues
Former-commit-id: bd183cdee13081a02efef5df75edf2292b872a16
2020-04-04 21:52:27 -04:00
antirez
957e917a84 Redis 6.0-RC3. 2020-03-31 17:56:04 +02:00
antirez
ef1b1f01a8 cast raxSize() to avoid warning with format spec. 2020-03-31 17:41:23 +02:00
antirez
9f347fabba Minor changes to #7037. 2020-03-31 17:12:19 +02:00
Guy Benoish
a509400d58 Modules: Test MULTI/EXEC replication of RM_Replicate
Makse sure call() doesn't wrap replicated commands with
a redundant MULTI/EXEC

Other, unrelated changes:
1. Formatting compiler warning in INFO CLIENTS
2. Use CLIENT_ID_AOF instead of UINT64_MAX
2020-03-31 17:12:19 +02:00
antirez
c3b268a0bc timeout.c created: move client timeouts code there. 2020-03-31 16:57:20 +02:00
Oran Agra
0f7dfc378c AOFRW on an empty stream created with MKSTREAM loads badkly
the AOF will be loaded successfully, but the stream will be missing,
i.e inconsistencies with the original db.

this was because XADD with id of 0-0 would error.

add a test to reproduce.
2020-03-31 16:57:20 +02:00
Guy Benoish
805c8c94a9 RENAME can unblock XREADGROUP
Other changes:
Support stream in serverLogObjectDebugInfo
2020-03-31 16:57:20 +02:00
antirez
97b80b57e9 Fix the propagate Tcl test after module changes. 2020-03-31 16:57:20 +02:00
antirez
4f6b6b8008 Modify the propagate unit test to show more cases. 2020-03-31 16:57:20 +02:00
antirez
616b1cb7ac Fix module commands propagation double MULTI bug.
37a10cef introduced automatic wrapping of MULTI/EXEC for the
alsoPropagate API. However this collides with the built-in mechanism
already present in module.c. To avoid complex changes near Redis 6 GA
this commit introduces the ability to exclude call() MUTLI/EXEC wrapping
for also propagate in order to continue to use the old code paths in
module.c.
2020-03-31 16:57:20 +02:00
antirez
08fdef4bf6 Fix RM_Call() stale comment due to cut&paste. 2020-03-31 16:57:20 +02:00
OMG-By
26b79ca18c fix: dict.c->dictResize()->minimal type 2020-03-31 16:57:20 +02:00
zhaozhao.zz
fa41863752 PSYNC2: reset backlog_idx and master_repl_offset correctly 2020-03-31 16:57:20 +02:00
antirez
bbbc80acae Precise timeouts: reference client pointer directly. 2020-03-31 16:57:20 +02:00
antirez
67643ead69 Precise timeouts: cleaup the table on unblock.
Now that this mechanism is the sole one used for blocked clients
timeouts, it is more wise to cleanup the table when the client unblocks
for any reason. We use a flag: CLIENT_IN_TO_TABLE, in order to avoid a
radix tree lookup when the client was already removed from the table
because we processed it by scanning the radix tree.
2020-03-31 16:56:46 +02:00
antirez
ad94066ec8 Precise timeouts: fix comments after functional change. 2020-03-31 16:56:46 +02:00
antirez
a443ec2e9a Precise timeouts: use only radix tree for timeouts. 2020-03-31 16:56:46 +02:00
antirez
6862fd70da Precise timeouts: fast exit for clientsHandleShortTimeout(). 2020-03-31 16:56:46 +02:00
antirez
30f1df8c48 Precise timeouts: fix bugs in initial implementation. 2020-03-31 16:56:46 +02:00
antirez
7add0f2490 Precise timeouts: working initial implementation. 2020-03-31 16:56:46 +02:00
antirez
9d6d177994 Precise timeouts: refactor unblocking on timeout. 2020-03-31 16:56:46 +02:00
antirez
316a8f1545 PSYNC2: fix backlog_idx when adjusting for meaningful offset
See #7002.
2020-03-31 16:56:46 +02:00
伯成
11db53f875 Boost up performance for redis PUB-SUB patterns matching
If lots of clients PSUBSCRIBE to same patterns, multiple pattens matching will take place. This commit change it into just one single pattern matching by using a `dict *` to store the unique pattern and which clients subscribe to it.
2020-03-31 12:47:14 +02:00
John Sully
e9d1f9bc6c Merge branch 'redis_6_merge' of https://github.com/JohnSully/KeyDB into redis_6_merge
Former-commit-id: 95b4f899c5a9218f7ed4cbb81b7f0b894bffe83f
2020-03-30 00:52:43 -04:00
John Sully
4cf5373b9c Merge branch 'unstable' into redis_6_merge
Former-commit-id: 294615531347d7db5d1b0c6a021ac9b05e0bcb48
2020-03-30 00:52:12 -04:00
John Sully
754138a94c Allow active replicas to connect to each other when replica-serve-stale-data is set
Former-commit-id: f2ca2aa1f70956a0309d6a2441417a80383fd717
2020-03-30 00:51:40 -04:00
John Sully
b28c7298ce Don't send build log to stderr
Former-commit-id: b20bf10fda319389c6e7d06cc7cc6c6b6b4f1c6c
2020-03-28 23:36:57 -04:00