102 Commits

Author SHA1 Message Date
John Sully
857f778b38 Make object refcounts atomic, technically it doesn't need to be currently but the semantics are complicated and error prone. This is much safer with little performance impact
Former-commit-id: e310d33c121550f69b1c06d101db0c3f944a7fb0
2019-07-18 15:49:12 -04:00
John Sully
add714913b Implement test mode to make finding bugs easier
Former-commit-id: 971f69fe1ff9cce50492a47f306b312457e50b9f
2019-07-15 14:55:18 -04:00
John Sully
ff0065df91 Fix more locking deadlocks
Former-commit-id: 3081b6f98b5e7a9f3ef7cfe040236070398b081c
2019-07-12 23:51:45 -04:00
John Sully
8cd37fae2c Fix deadlock with client and ae locks
Former-commit-id: 8630339e43c1de1cd723bdfdca8ab5924e2cb8b0
2019-07-12 20:46:50 -04:00
John Sully
3ffe5b5dde Add Active Replication tests
Former-commit-id: 528d10091fda0d2c56674e825c4f70467587955f
2019-07-12 03:54:41 -04:00
John Sully
35e23ca988 Fix compile errors on GCC v5
Former-commit-id: 1f08a0efb33511ddc75c2acc62199bfcd0860137
2019-07-11 20:20:01 -04:00
John Sully
8ba25371a5 Fix active replication offset synchronization accounting, and enable the wait command
Former-commit-id: a5784ef09e71a9a45780a8f3dbab875b1f1fe1a5
2019-07-11 17:00:23 -04:00
John Sully
d65ce6fbbc Fix issues with relaxed memory model architectures
Former-commit-id: e37bc4ad40e852b67ee14e5aa87fd2f398f00eed
2019-06-17 23:00:12 -04:00
John Sully
9725fadaba convert the pending write list to a vector for better performance and less cache thrashing
Former-commit-id: ae33ff3a6ef6d47bab63cf8362055c1ed210dbad
2019-06-17 23:00:12 -04:00
John Sully
924509f52f Move more code out of the GIL
Former-commit-id: 59dbd625c143c1a890d4387f7a32c997f0d64f5f
2019-06-17 23:00:12 -04:00
John Sully
9a050ffb42 Remove an unnecessary lock that eats performance
Former-commit-id: 8eb4e355b934e394608b082c7d1973152238fa1f
2019-06-17 23:00:12 -04:00
John Sully
7fc6f7f607 Enable load balancing of UNIX sockets across threads
Former-commit-id: 46d6caa47c57fa13055615dfc2376b0962468b81
2019-06-11 01:34:36 -04:00
John Sully
dd5152f836 Fix regressions from RESP3 changes in commit c8304b099d82dba4da35f4cfaa99595bcdb46d1a
Former-commit-id: c5cbb77fc7e3b2b5124b9432e144d8c74190c755
2019-05-20 23:39:44 -04:00
John Sully
7d40b9b7d5 Fix double unlock
Former-commit-id: 87dc8ce9b3e376e4a6264aee1d2787b9f8d6437f
2019-05-20 15:52:04 -04:00
John Sully
397e85befb Merge branch 'unstable' of https://github.com/antirez/redis into MergeRedis
Note: some tests failing

Former-commit-id: 86d7276f24f0cf1a0eceb6cd00a6a0ae2a0fa520
2019-05-11 02:20:34 -04:00
John Sully
3d2b9e3ab8 Fix module locking issues
Former-commit-id: bf26959b722285f9b8caedb853e712d5b4ce6b3f
2019-05-09 19:00:27 -04:00
John Sully
6ae796cb91 refactor server global into a pointer (so that threadsafe commands can set this to NULL to prove they don't rely on it
Former-commit-id: 37b2d046bef12c7ee7cac4883f0b64ddde236d74
2019-04-21 14:01:10 -04:00
John Sully
83adc0eabb Factor out some normally const globals
Former-commit-id: fa2e407873fce7f936943ae1fe162d54d7bedd70
2019-04-21 13:20:45 -04:00
John Sully
676334758d Add version override command for users that need compatibility with Redis
Former-commit-id: 5a78a3bc46335a844490fe00e657d68313680cbe
2019-04-19 19:57:11 -04:00
John Sully
0e10e4f6f5 Start of MVCC support (and more C++)
Former-commit-id: c4621a5ed2a7d8ca5034f2fbe8b71550f290ea64
2019-04-16 23:16:03 -04:00
John Sully
68bec6f239 Move remaning files dependent on server.h over to C++
Former-commit-id: 8c133b605c65212b023d35b3cb71e63b6a4c443a
2019-04-08 01:00:48 -04:00
John Sully
15caa9f10b Add RREPLAY command and put the issue of packet storms to rest. Fixes issue #24
Former-commit-id: 68d2b648e0cfeac1ec6f7b68255631ba27d83739
2019-04-06 00:14:27 -04:00
John Sully
846cad0637 Merge branch 'unstable' into wip-multimaster
Former-commit-id: 4326d22380e4e4d9491c4b7cd050b26ec49663b3
2019-04-03 00:12:13 -04:00
John Sully
529a517740 Fix cluster test failure (not real issue)
Former-commit-id: 161d3a35ff2be2aa761f6fb0167dfc4aac4251c6
2019-04-03 00:11:34 -04:00
John Sully
22c8d9f70b Merge branch 'unstable' of https://github.com/antirez/redis into unstable
Former-commit-id: 3745bbd95b16d7134c86143f458d7f31168c7d33
2019-04-03 00:00:38 -04:00
John Sully
5d3c28a902 It compiles and doesn't crash immediately!
Former-commit-id: efaeca588717ca7cd44aa3502672d158acd94a6d
2019-04-02 16:47:05 -04:00
John Sully
9c27743340 Implement database merging for Active Replicas
Former-commit-id: 91e6368de0f0ecb7e4db497ce286a15336d4ec34
2019-03-28 15:12:43 -04:00
John Sully
ccb9cb8b01 Active Replica Support
Former-commit-id: a7aa2b074049a130761bc0a98d47130b6a0ff817
2019-03-24 15:39:10 -04:00
John Sully
fbe1a6c52a Add debugging stats to the INFO command
Former-commit-id: ac80a5c6a6676f45ac7d460a9cfb02fef8b48d78
2019-03-19 22:04:33 -04:00
John Sully
1508a46c3b Feature gate SO_INCOMING_CPU so we compile on older kernels
Former-commit-id: 267e84f97d61f8aa416f88870c21bdf2a0cc635a
2019-03-19 18:55:42 -04:00
John Sully
25c2050c3a Module threading fixes
Former-commit-id: 2785a8b4d40b09caea5e209ab49fc5f1484981a8
2019-03-07 19:13:01 -05:00
John Sully
809cbfd495 Don't send replies to slaves after we've queued them to be closed
Former-commit-id: a52cd974b90cdf00b7f10525e754755ca5428dbb
2019-03-06 15:21:05 -05:00
John Sully
9a615a4850 defer free
Former-commit-id: de4217489c87cd8347ecdb7f4df5c3b7615330d6
2019-03-05 15:46:19 -05:00
John Sully
459e6adb83 Fix crash with paused clients (accessed when global lock is not acquired)
Former-commit-id: 3c658b5012ed20f502976706e657cd2fa05e246c
2019-03-03 22:24:12 -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
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
John Sully
554012085c All tests pass single thread 2019-02-23 00:09:34 -05:00
John Sully
cfabd4f666 Fix failure to trim querybuf (and memory tests that fail because of it) 2019-02-22 22:09:25 -05:00
John Sully
5539e7522a Merge branch 'unstable' of https://github.com/antirez/redis into Multithread 2019-02-22 21:16:10 -05:00
John Sully
dbd82f6bfc Lock use after free 2019-02-22 21:00:14 -05:00
John Sully
30e8a859c0 Prevent mixed up client replies, and deadlocks 2019-02-22 01:24:16 -05:00
John Sully
722e46d8a8 Update copyright notice on files heavily changed 2019-02-21 00:17:07 -05: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