9431 Commits

Author SHA1 Message Date
John Sully
4f56e9c3b0 Merge commit 'e91ca9fee9c56ef319b407b104afc435be0c53cb' into redis_6_merge
Former-commit-id: 516c8c6e231cdfc87a3db5be401407cb7afa3937
2020-04-14 20:42:48 -04:00
John Sully
68c50ae876 Merge commit '6718d5d37517bd927635649708913affb98f67c9' into redis_6_merge
Former-commit-id: ef1236b6009ebd7b00f6dd2f43df57ad95e51253
2020-04-14 20:19:48 -04:00
John Sully
2c049c16a2 Merge commit '79e8b17d7b44c793d8b22668b8583a297ee1b387' into redis_6_merge
Former-commit-id: 28cbed1d13961c5568f2bdc50c6a23107d3434d0
2020-04-14 20:09:53 -04:00
John Sully
d48ea996e7 Merge commit '13fbdf970660b15011c4312f31137e58bbda5b2c' into redis_6_merge
Former-commit-id: cde199a7973ad63317b68f581df607321e12bf46
2020-04-14 19:43:04 -04:00
John Sully
6df76a3bfa Merge commit 'a8e2bbe8f6a3f4833f286cc5049e6b52c87de1a9' into redis_6_merge
Former-commit-id: 5589a0a69ca6f5798b750a6a79f7e9b44d20e136
2020-04-14 19:22:44 -04:00
John Sully
2038fa270a Merge commit '491949ee5bf4ffbfc746ea4ed5a6d673b0e2fb81' into redis_6_merge
Former-commit-id: 09e8fb17cd0889ad17461e48446221b3955f5a8f
2020-04-14 18:44:42 -04:00
John Sully
9039879f80 Merge commit '2ad427f862084e0e18fbd6c313af35ccdb6c68f7' into redis_6_merge
Former-commit-id: d71c4c221580221c2c31b5e3b5d23bab50a544dc
2020-04-14 18:30:26 -04:00
John Sully
06017d7900 Merge commit '9a39a227fff45baa0f1532dba017f31ac71b68e5' into redis_6_merge
Former-commit-id: 6f621e6480fd629593de8b264117a8b130b21175
2020-04-14 18:29:03 -04:00
John Sully
c198d81582 Merge commit 'dff5370c8be0dcef1728b95b17906d2494ce9bf2' into redis_6_merge
Former-commit-id: 8e33c2d30116ea469238c340ed367f0182856454
2020-04-14 18:05:10 -04:00
John Sully
17a1637c89 Merge commit '87d059a7454aad2c3a9810ddafd33c3a9e4be383' into redis_6_merge
Former-commit-id: 52aca124c30815fc1609ce2fb36081823ef5ddef
2020-04-14 18:04:51 -04:00
antirez
910db44fc5 Jump to right label on AOF parsing error.
Related to #6054.


Former-commit-id: c7159d58f118e840a3b9f72160d1abf3e8a86b3d
2020-04-14 18:03:22 -04:00
antirez
c38bc83f47 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
031d5044bf 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
c168ae6cfe Fix merge conflicts from cherry-pick
Former-commit-id: 57956b3fd2d05581c976f58d07e245896d3a515b
2020-04-14 17:33:54 -04:00
antirez
f7e8240900 Remove RDB files used for replication in persistence-less instances.
Former-commit-id: b323645227a3e2cc5928e649586221aba508b10d
2020-04-14 17:27:05 -04:00
Johannes Truschnigg
0ef7e8e0b2 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
49dda32114 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
a0447f23ac 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
38d16ea581 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
549b15d5a2 Merge branch 'unstable' into redis_6_merge
Former-commit-id: 294615531347d7db5d1b0c6a021ac9b05e0bcb48
2020-03-30 00:52:12 -04:00
John Sully
12f76b2b95 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
883de95712 Don't send build log to stderr
Former-commit-id: b20bf10fda319389c6e7d06cc7cc6c6b6b4f1c6c
2020-03-28 23:36:57 -04:00
John Sully
f8f752f2ab Merge branch 'unstable' into redis_6_merge
Former-commit-id: 208c15bc16aa2a0abf8f8dbcb132316134f0be31
2020-03-27 14:50:37 -04:00
John Sully
4af17a23d8 Raspberry Pi fixes (compile and replication)
Former-commit-id: c3d3c82f3a1751f063a3e77b4bde47f1802a517e
2020-03-27 12:46:25 -04:00
John Sully
f4caa84987 Fix merge issues
Former-commit-id: b22d9cc27d0434578891c59825f1c8813a3a9b28
2020-03-25 22:26:27 -04:00
John Sully
9c4b66b9a4 Merge branch 'unstable' into redis_6_merge
Former-commit-id: 908cf5042ebcd7870166bd1a0bb450f37e5f3b4d
2020-03-25 22:12:22 -04:00
John Sully
71fe6f7ba9 Fix issue #143
Former-commit-id: 6ec1641294b23e22a2a5dc5cc6098a02ce234df3
2020-03-25 21:55:31 -04:00
John Sully
b443553a3d Give a better error when handling std::terminate
Former-commit-id: 7b79ec360ba046da6d9dbf3cc731bbdee1458d34
2020-03-25 16:27:24 -04:00
John Sully
b1c9dcaa05 Merge branch 'unstable' into redis_6_merge
Former-commit-id: 718aee242dd75abd16a5a6a89353d2a35f37b010
2020-03-25 15:47:12 -04:00
John Sully
118bd49a4e Add roundtrip test for subkey expires
Former-commit-id: 56fc6b7deb59cfb3219d65c01c96969d3983e84a
2020-03-25 15:34:30 -04:00
John Sully
41dfd175a8 Fix failure to load subkey expires
Former-commit-id: 528a43bd6c80f073d928dd18c4f67f37cfd0977a
2020-03-25 01:38:58 -04:00
John Sully
9ff5d3f3c4 Expire entry needs to be resorted after a subkey expires
Former-commit-id: b357803362728c26a1169e3cec279c693b86205b
2020-03-25 01:06:40 -04:00
John Sully
2b199b384d Unstable branch should always be version 0.0.0
Former-commit-id: 448808529ab9e9e4705c2e7cbda5b3e6523b7c6f
2020-03-19 15:52:24 -04:00
John Sully
436ffa98de Merge branch 'RELEASE_5' into unstable
Former-commit-id: a0bc2084128f991697d3e1b7473d14c55afdd785
2020-03-19 15:38:16 -04:00
John Sully
4f55afa948 Print stack traces of other threads in the deadlock detector
Former-commit-id: 6b0172b9bf124372f4c8688c91c380c6c1b607c7
2020-03-19 15:37:49 -04:00
John Sully
833f5b39f4 Log which thread a message came from
Former-commit-id: bc1eccb66d3302d6c99588fb4a5a879e1ef243b1
2020-03-19 15:37:24 -04:00
John Sully
1b9ef774da Fix lock inversion in processEventsWhileBlocked
Former-commit-id: a9249d4a82a0f0355ac8ffa40b34b9c14cabf66b
2020-03-19 15:28:39 -04:00
John Sully
96be5f6a6c Prevent dangling lock when we can't free the client
Former-commit-id: 3c373494d63b21744b264f0a47e6999bcdda6b2b
2020-03-19 14:34:23 -04:00
John Sully
e800858c4c Merge branch 'unstable' into redis_6_merge
Former-commit-id: 40761e403166bf3342fe388ab742498f99245b1a
2020-03-17 00:09:48 -04:00
John Sully
72f6847f95 Fix issue #153: Config get replicaof returns a corrupt response
Former-commit-id: 5aef606d3bc1d748ca8d2df1d36feccaa2e583c0
2020-03-16 20:43:46 -04:00
John Sully
61176a1a5e Merge branch 'unstable' into redis_6_merge
Former-commit-id: 4671cd6002c50dd8484e59fd7434878053340702
2020-03-15 18:47:27 -04:00
John Sully
af3afa979a Handle HTTP error codes with MOTD
Former-commit-id: 2ec0b2cd206f2c73fabcda5d59751b013aa8cfbf
2020-03-15 18:47:01 -04:00
John Sully
97537d0525 Merge branch 'unstable' into redis_6_merge
Former-commit-id: 07effa392564f3c53989600e803103f3e3951fe7
2020-03-15 18:33:24 -04:00
John Sully
143ae07899 Update MOTD URL
Former-commit-id: cd76a71de393eb527f98024ea85a9492ef0c36ca
2020-03-15 18:32:05 -04:00
antirez
e91ca9fee9 Remove RDB files used for replication in persistence-less instances. 2020-03-05 12:51:14 +01:00
antirez
dcafd2d77e Use a smaller getkeys global buffer.
The idea is that very few commands have a lot of keys, and when this
happens the allocation time becomes neglegible.
2020-03-05 12:51:14 +01:00
Oran Agra
328b6e473c Optimize temporary memory allocations for getKeysFromCommand mechanism
now that we may use it more often (ACL), these excessive calls to malloc
and free can become an overhead.
2020-03-05 12:51:14 +01:00
antirez
8a7e1fe3b0 Modules: reformat RM_Scan() top comment a bit. 2020-03-05 12:51:14 +01:00
antirez
76cfe21ff7 Modules: more details in RM_Scan API top comment. 2020-03-05 12:51:14 +01:00
Oran Agra
0693ac1961 RM_Scan disable dict rehashing
The callback approach we took is very efficient, the module can do any
filtering of keys without building any list and cloning strings, it can
also read data from the key's value. but if the user tries to re-open
the key, or any other key, this can cause dict re-hashing (dictFind does
that), and that's very bad to do from inside dictScan.

this commit protects the dict from doing any rehashing during scan, but
also warns the user not to attempt any writes or command calls from
within the callback, for fear of unexpected side effects and crashes.
2020-03-05 12:51:14 +01:00