433 Commits

Author SHA1 Message Date
John Sully
ccb9cb8b01 Active Replica Support
Former-commit-id: a7aa2b074049a130761bc0a98d47130b6a0ff817
2019-03-24 15:39:10 -04: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
Salvatore Sanfilippo
d415aa89c0 Merge pull request #5944 from yossigo/command-filtering
Command Filtering API
2019-03-22 17:43:49 +01:00
Salvatore Sanfilippo
e19f00f8b2 Merge pull request #5945 from dvirsky/miss_notification
Added keyspace miss notifications support
2019-03-22 17:41:00 +01:00
John Sully
f11840f6b2 Merge branch 'unstable' of https://github.com/antirez/redis into unstable
Former-commit-id: 9322d604eea7b48df3feff47ce2c04f82291228f
2019-03-21 20:15:59 -04:00
Dvir Volk
51a54dfde3 remove extra linebreak 2019-03-21 12:48:37 +02:00
Dvir Volk
50befc42ad added special flag for keyspace miss notifications 2019-03-21 11:47:14 +02:00
John Sully
fbe1a6c52a Add debugging stats to the INFO command
Former-commit-id: ac80a5c6a6676f45ac7d460a9cfb02fef8b48d78
2019-03-19 22:04:33 -04:00
Yossi Gottlieb
bb6e8ba682 Initial command filter experiment. 2019-03-18 13:50:34 +02:00
Yossi Gottlieb
dd405d4026 Add RedisModule_GetKeyNameFromIO(). 2019-03-15 10:23:27 +02:00
John Sully
92dc1bed13 Hack to prevent build errors on some machines due to missing throw()
Former-commit-id: a9e525c81e62f99e083fdddc5c62d11e5e46a5f4
2019-03-15 05:28:20 +00:00
John Sully
aa76a89a9a Merge branch 'unstable' of https://github.com/antirez/redis into unstable
Former-commit-id: be3cb1ad3386f382ed7506dbfd1adb810e327007
2019-03-14 14:22:27 -04:00
Salvatore Sanfilippo
06339c7f54 Merge pull request #5834 from guybe7/trim_module_sds
Trim SDS free space of retained module strings
2019-03-14 12:41:31 +01:00
antirez
4e3f2ab269 Merge branch 'sharedapi' into unstable 2019-03-14 11:24:48 +01:00
John Sully
6702b89166 Merge branch 'unstable' of https://github.com/antirez/redis into unstable
Lots of fixes and improvements from upstream.


Former-commit-id: 261cf24efc8bedec7ee76a8897b9a800a4d663e2
2019-03-13 18:08:22 -04:00
John Sully
38fd0476d5 Merge branch 'unstable' into RELEASE_0_9
Former-commit-id: 0bc586933ff91fd07128d5419b06303f05d16f2e
2019-03-07 19:13:33 -05:00
John Sully
25c2050c3a Module threading fixes
Former-commit-id: 2785a8b4d40b09caea5e209ab49fc5f1484981a8
2019-03-07 19:13:01 -05:00
Yuan Zhou
e5149be9de server.h: remove dead code
hashTypeTryObjectEncoding() is not used now
2019-03-07 18:38:27 +08:00
John Sully
d1c93ee8e1 port server.c to server.cpp
Former-commit-id: 09e6a4fee09b1a61e6d2ac83a2c8fec9978474ec
2019-03-06 16:29:30 -05:00
John Sully
a8dacb0046 Merge branch 'unstable' of https://github.com/antirez/redis into unstable
We want that awesome multithreaded benchmark


Former-commit-id: 07594d4f958892f9270a18bc182728e4dfbf8144
2019-03-02 18:07:18 -05:00
Salvatore Sanfilippo
e2a7df2d6c Merge pull request #5877 from vattezhang/unstable_sentinel_cmd
fix: fix sentinel command table and new flags format
2019-02-27 15:45:03 +01:00
vattezhang
034741f7e8 fix: fix sentinel command table and new flags format 2019-02-27 21:35:58 +08:00
John Sully
8db15e9666 Thread affinity feature (default disabled)
Former-commit-id: 9b1e95809ce57fea84f30b8d5fb68ee00bd46ceb
2019-02-26 15:14:35 -05:00
John Sully
be82e98799 writes shouldn't be under the global lock
Former-commit-id: bcfd9327cb4fcf5e1fca9477862919817ddc5ab8
2019-02-26 00:19:38 -05:00
antirez
8b01d81fd4 Merge branch 'gopher' into unstable 2019-02-25 18:16:58 +01:00
antirez
505815da4b RESP3: allow HELLO to be used with version = 2. 2019-02-25 16:41:00 +01:00
John Sully
30e8a859c0 Prevent mixed up client replies, and deadlocks 2019-02-22 01:24:16 -05:00
John Sully
8cd2cdca3d Merge branch 'unstable' of https://github.com/antirez/redis into Multithread 2019-02-21 18:17:12 -05:00
antirez
c8b67fea44 Gopher: initial request handling. 2019-02-21 23:13:08 +01:00
antirez
20c7d1b334 Gopher: config setting to turn support on/off. 2019-02-21 17:28:53 +01:00
John Sully
8e8abb2ff9 Cleanup lock contention, and ensure clients are written to in an unsafe way when the global lock is released 2019-02-20 23:30:21 -05:00
John Sully
627c19e02f Multithreading works! 2019-02-20 01:20:26 -05:00
John Sully
3f4315125c Most tests failing, except some memory and number of PSYNC syncs 2019-02-19 01:11:00 -05:00
John Sully
e9a2b6f561 deadlock fixes 2019-02-18 23:52:21 -05:00
John Sully
0914b52ffa Thread safety fixes 2019-02-18 22:25:35 -05:00
John Sully
65e48b868e Load balance connections across threads (config NYI and hardcoded) 2019-02-16 14:26:19 -05:00
John Sully
90c6c37628 make headers C++ safe 2019-02-15 16:55:40 -05:00
John Sully
aed915cebc make networking.c a C++ file 2019-02-15 14:11:34 -05:00
John Sully
0f293d4fb0 Fix most failing tests 2019-02-15 10:53:32 -05:00
zhaozhao.zz
3eb2f4ca14 ACL: show categories in COMMAND reply
Adding another new filed categories at the end of
command reply, it's easy to read and distinguish
flags and categories, also compatible with old format.
2019-02-14 00:13:01 +08:00
Guy Benoish
9cd3b12cdf Trim SDS free space of retained module strings
In some cases processMultibulkBuffer uses sdsMakeRoomFor to
expand the querybuf, but later in some cases it uses that query
buffer as is for an argv element (see "Optimization"), which means
that the sds in argv may have a lot of wasted space, and then in case
modules keep that argv RedisString inside their data structure, this
space waste will remain for long (until restarted from rdb).
2019-02-12 14:21:21 +01:00
zhaozhao.zz
de0f42bff3 ACL: add masteruser configuration for replication
In mostly production environment, normal user's behavior should be
limited.

Now in redis ACL mechanism we can do it like that:

    user default on +@all ~* -@dangerous nopass
    user admin on +@all ~* >someSeriousPassword

Then the default normal user can not execute dangerous commands like
FLUSHALL/KEYS.

But some admin commands are in dangerous category too like PSYNC,
and the configurations above will forbid replica from sync with master.

Finally I think we could add a new configuration for replication,
it is masteruser option, like this:

    masteruser admin
    masterauth someSeriousPassword

Then replica will try AUTH admin someSeriousPassword and get privilege
to execute PSYNC. If masteruser is NULL, replica would AUTH with only
masterauth like before.
2019-02-12 17:12:37 +08:00
John Sully
6059bc7e67 Initial work of multithreaded key-db. Note: Fails tests 2019-02-11 03:36:18 -05:00
John Sully
5be3566838 Performance enhancements! 2019-02-09 13:05:06 -05:00
John Sully
f6736cd713 Reduce memory usage for in place strings by 8 bytes 2019-02-09 13:04:18 -05:00
John Sully
dac1213462 complete rebranding with tests passing 2019-02-09 10:11:46 -05:00
antirez
87ce87e68c ACL: load ACL file at startup. Prevent silly configurations. 2019-02-07 17:20:03 +01:00
John Sully
ef310bc7f8 Merge branch 'unstable' of https://github.com/antirez/redis into unstable 2019-02-06 00:09:39 -05:00
John Sully
cd8145e314 Make main headers C++ safe, and change rdb to use file descriptor instead of FILE pointer 2019-02-05 23:36:40 -05:00
antirez
1bdc63cc01 ACL: implement rewriting of users in redis.conf. 2019-02-05 10:48:17 +01:00