WuYunlong
0578157d56
Fix master replica inconsistency for upgrading scenario.
...
Before this commit, when upgrading a replica, expired keys will not
be loaded, thus causing replica having less keys in db. To this point,
master and replica's keys is logically consistent. However, before
the keys in master and replica are physically consistent, that is,
they have the same dbsize, if master got a problem and the replica
got promoted and becomes new master of that partition, and master
updates a key which does not exist on master, but physically exists
on the old master(new replica), the old master would refuse to update
the key, thus causing master and replica data inconsistent.
How could this happen?
That's all because of the wrong judgement of roles while starting up
the server. We can not use server.masterhost to judge if the server
is master or replica, since it fails in cluster mode.
When we start the server, we load rdb and do want to load expired keys,
and do not want to have the ability to active expire keys, if it is
a replica.
2020-03-25 15:54:34 +01:00
antirez
9c2e42ddfc
ACL: Make Redis 6 more backward compatible with requirepass.
...
Note that this as a side effect fixes Sentinel "requirepass" mode.
2020-03-25 15:54:34 +01:00
antirez
127e09bca1
Make sync RDB deletion configurable. Default to no.
2020-03-05 12:51:15 +01:00
antirez
be4bc1a5be
Remove RDB files used for replication in persistence-less instances.
2020-03-05 12:51:14 +01:00
John Sully
0114827642
Fix CLANG build break
...
Former-commit-id: 5e63c0955d2861ab0ebe2055d4f2d2e8989ea4f3
2020-03-04 17:24:17 -05:00
John Sully
b3e33daf7d
Fix CLANG build break
...
Former-commit-id: c2a98a60f964f28455a5d04e18b88a9a45c9e586
2020-03-04 17:23:40 -05:00
John Sully
a669a40ac6
Merge branch 'unstable' into redis_6_merge
...
Former-commit-id: 52fd4445a472fa3112e96c6a7ef66ecdfe6ce9f5
2020-03-04 17:13:01 -05:00
John Sully
de2b08c3f8
Add extra logging when reporting errors from masters - especially in rreplay
...
Former-commit-id: 5397f0b03312b8cace07a85333d8f035bdfb8d57
2020-03-04 17:09:12 -05:00
antirez
b439542604
Tracking: optin/out implemented.
2020-02-27 18:02:30 +01:00
antirez
f15fb727a0
Tracking: fix max-keys configuration directive.
2020-02-27 18:00:46 +01:00
antirez
3c16d6b32d
Tracking: first conversion from hashing to key names.
2020-02-27 17:59:57 +01:00
antirez
d4fe79a174
Tracking: BCAST: broadcasting of keys in prefixes implemented.
2020-02-27 17:59:57 +01:00
antirez
abb81c6351
Tracking: BCAST: registration in the prefix table.
2020-02-27 17:59:57 +01:00
antirez
77da960815
Tracking: BCAST: parsing of the options + skeleton.
2020-02-27 17:59:57 +01:00
antirez
a788c373e6
Tracking: minor change of names and new INFO field.
2020-02-27 17:59:57 +01:00
John Sully
79e945f5e5
Merge branch 'unstable' into redis_6_merge
...
Former-commit-id: 6a71de7835f427cebb23e4c2f0d19ed63a02f09e
2020-02-16 19:14:51 -05:00
John Sully
47f98259f9
Support C++14 and remove dependency on future standard 2a
...
Former-commit-id: 18496b62853738bf7bd48f65fe34aafcba8bbe0b
2020-02-16 19:04:56 -05:00
John Sully
4d01660331
Graceful shutdown of server threads when quit is requested
...
Former-commit-id: b9db899f6ccea62222170c6eec264d403a7a911d
2020-02-16 18:53:46 -05:00
John Sully
873d5537e8
Merge branch 'unstable' into redis_6_merge
...
Former-commit-id: 30a603ce05956195aa027a3400eafd48d2750ea7
2020-02-16 18:18:24 -05:00
John Sully
0b5a7f5482
Memory leak fix on config, and redisDb dtor
...
Former-commit-id: b92bbf4de8ffc3edc965e2f9da4dd82ed7071559
2020-02-16 17:08:00 -05:00
Guy Benoish
dd34f70368
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).
2020-02-12 14:17:54 +01:00
Guy Benoish
dcbe8bfad1
Exclude "keymiss" notification from NOTIFY_ALL
...
Because "keymiss" is "special" compared to the rest of
the notifications (Trying not to break existing apps
using the 'A' format for notifications)
Also updated redis.conf and module.c docs
2020-02-12 14:17:54 +01:00
Oran Agra
c82ccf0670
memoryGetKeys helper function so that ACL can limit access to keys for MEMORY command
2020-02-12 14:15:56 +01:00
antirez
51c1a9f8fb
ACL LOG: make max log entries configurable.
2020-02-12 14:15:35 +01:00
antirez
7379c78a9b
ACL LOG: log failed auth attempts.
2020-02-12 14:15:35 +01:00
antirez
f1974d5d67
ACL LOG: actually emit entries.
2020-02-12 14:15:35 +01:00
antirez
577fc4388b
ACL LOG: data structures and initial functions.
2020-02-12 14:15:35 +01:00
John Sully
ee99605def
Merge branch 'unstable' into redis_6_merge
...
Former-commit-id: 18a5f46b6138e8a975dda0ed4897d19eed756d24
2020-02-11 02:39:08 -05:00
John Sully
e30630d53b
Implement an error handler so bug #125 can't happen
...
Former-commit-id: 16a019dba053fd0654116ff98a2ad0b66a9ed4e6
2020-02-11 01:41:00 -05:00
John Sully
3282d4114f
Fix higher latency at low load by grouping clients to threads. This fixes slow perf in cluster benchmarks mentioned in issue #102
...
Former-commit-id: 1a4c3224c9848f02fbdb49674045b593cfc41d31
2020-02-11 01:00:21 -05:00
John Sully
9cd3b8253d
Ensure multi-master works for ring topologies
...
Former-commit-id: a7cc3aac28ccec4dadb80aa2cc7279c53982bc28
2020-02-10 00:25:03 -05:00
Leo Murillo
f7a94526dd
Set ZSKIPLIST_MAXLEVEL to optimal value given 2^64 elements and p=0.25
2020-02-04 10:23:48 +01:00
John Sully
46506b3e53
module fixes
...
Former-commit-id: ef4e11ecb8a6f1a05bb21f014120b0ef9e771b60
2020-02-04 01:22:25 -05:00
John Sully
2c899d7219
addRef memory model too restrictive
...
Former-commit-id: 249e0fdd363853ab7b489314002bdacd2438fa55
2020-02-01 21:52:17 -05:00
John Sully
8e7f3304b2
More threading fixes from merge
...
Former-commit-id: 4a980f4ddbebe3f62703aa3de67c93cdffb6b4b8
2020-01-28 17:54:00 -05:00
John Sully
e3b2ef962b
reenable multithreading after merge
...
Former-commit-id: 9fbb9a551e83ddfc66894fba688dae7c9c3c7ae1
2020-01-27 19:59:04 -05:00
John Sully
39378f982e
Fix most tests (still some failures)
...
Former-commit-id: da83e841255487efe0e4b13d42b2dcc55a369838
2020-01-27 18:16:19 -05:00
John Sully
8e5fe97525
Merge remote-tracking branch 'redis/6.0' into redis_merge
...
Former-commit-id: ef9a3cadcf94326bf2f163db7698aad9a3c01690
2020-01-27 02:55:48 -05:00
John Sully
262b9a5d92
Initial implementation of the CRON command
...
Former-commit-id: 3204a39ada15ec33ac7926dc8b8f0e1875b99acb
2020-01-21 19:50:28 -05:00
John Sully
74fcfc0b7f
Avoid crash due to excessive posted functions for AOF rewrite
...
Former-commit-id: aa6409f2e8a37288eb4953fbcf3a82e02545348b
2020-01-11 16:34:09 -05:00
Petr Vaněk
6eadfd5d34
Rename redis.conf to keydb.conf
...
Former-commit-id: 4b01ad1e30568a5385881accedd8a841c7a7882f
2019-12-21 15:00:24 -05:00
Petr Vaněk
9ff5ae8a7b
Rename default pid file
...
Former-commit-id: 3b60929bdc95f43901799042b302c713b520aee8
2019-12-21 15:00:24 -05:00
Salvatore Sanfilippo
d3a9dff6b9
Merge pull request #6615 from soloestoy/wrap-also-propagate-as-multi
...
Wrap also propagate as multi
2019-12-19 09:24:52 +01:00
Salvatore Sanfilippo
f4b8197060
Merge pull request #6052 from jtru/better-systemd-integration-v2
...
Better systemd integration v2
2019-12-19 08:54:22 +01:00
antirez
5b9d3ac6c6
Avoid changing setKey() API after #6679 fix.
2019-12-18 11:58:02 +01:00
zhaozhao.zz
24044f3356
add a new SET option KEEPTTL that doesn't remove expire time
2019-12-18 15:20:36 +08:00
John Sully
ce6a682173
Launch the pro binary with --enable-pro
...
Former-commit-id: ab365ce3da864bbcd0d8a9c77ba55dad365ffdff
2019-12-17 23:52:19 -05:00
Salvatore Sanfilippo
b7c78b7651
Merge pull request #5916 from madolson/dev-unstable-acl-module-pr
...
Add module APIs for custom authentication
2019-12-17 09:58:26 +01:00
Madelyn Olson
c95a582a74
Add configuration option for allowing reads on cluster down
2019-12-16 23:33:16 -08:00
Madelyn Olson
67aa527b22
Added some documentation and fixed a test
2019-12-17 07:15:04 +00:00