72 Commits

Author SHA1 Message Date
John Sully
1d368edc10 Add double unlock detection and improve fastlock_unlock assmebly
Former-commit-id: 98aefac09b6b59371e6c1c77d1ef2794bfc5ae62
2020-02-17 19:54:05 -05:00
John Sully
c810823abe processEventsWhileBlocked not exception safe
Former-commit-id: 1ef187533c26bfa0c084a815b8b80de92ba1cf0b
2020-02-17 19:03:49 -05:00
John Sully
4748094356 Fix race condition in allocating connections to threads
Former-commit-id: 52434a583aa7114ff5658226441ab82ed3110a57
2020-02-11 03:44:28 -05:00
John Sully
d4c1e98124 Implement an error handler so bug #125 can't happen
Former-commit-id: 16a019dba053fd0654116ff98a2ad0b66a9ed4e6
2020-02-11 01:41:00 -05:00
John Sully
fef9925b7f 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
b3dd59db5c Additional asserts ensuring the client is creating on the correct thread
Former-commit-id: 937702ea1dd0a4331dd7c66ee9f5c2c3f2354d10
2019-11-20 17:00:40 -05:00
John Sully
8c6f775cf7 Cluster multithreading fixes
Former-commit-id: 3dd78a6101df0a980e520dcb55d80651bfc5a3a7
2019-11-14 20:14:24 -05:00
John Sully
7dac41ed72 killing clients should take effect ASAP
Former-commit-id: d0ccb074d5451cd457fe88efeb007cdb9746cb7f
2019-11-14 19:49:32 -05:00
John Sully
70fba8e707 Two fixes: 1) Remove race conditions by not locking clients when async writing. 2) Don't derefence dangling pointers in lambda
Former-commit-id: cb93752aff4c67d4475e9ed17833335716c45744
2019-10-24 23:07:02 -04:00
John Sully
7bdc24a86d Remove the DB lock, its unnecessary
Former-commit-id: 631f863dd89cd642e2023beabf8b31cdc84bbdff
2019-10-24 20:18:48 -04:00
John Sully
8b44d86c7c processEventsWhileBlocked needs to release the lock in a safe way
Former-commit-id: 1a70af2ae13962db038b0635cc29488019323538
2019-10-23 13:19:57 -04:00
John Sully
60c35d6ea7 Remove race conditions
Former-commit-id: 5a8cb77d0df7f319809ff965a72fe46925f49289
2019-10-22 23:26:37 -04:00
John Sully
b1190c24a8 Optimize deadlock detection, fix callstack for ASM, and annotate locks
Note: This change moves our assembly code to use the GNU Assembler because NASM seems to be incapable of emitting the necessary debug information for callstack unwinding to work.

Former-commit-id: 600fc241cfe79b9b32ac6010c6ea0c66747f0f15
2019-10-22 21:34:51 -04:00
John Sully
e57d2e24c9 Update more slave instances to use replica (Issue #75)
Former-commit-id: 252725d50fc9d4ff2b6e9246a36c38176d61beae
2019-10-13 12:29:20 -04:00
John Sully
bd4ed482c4 KEYS now only blocks one database
Former-commit-id: 18d42a5c353f76533a0ccc4ded24ed089cedacc8
2019-09-12 18:51:10 -04:00
John Sully
a21a7a8ee9 Fix race condition in PUB/SUB and other async reply commands where the client can be freed before our handler is executed on the client thread. When this occurs the client pointer is dangling
Former-commit-id: 46a78c69e718f0aeb5e62f33c59458b15b8d9bc6
2019-08-26 20:18:52 -04:00
John Sully
33acb40633 Merge commit '985e5b2c608eade2a60e50a6a177f13381c9c8d8' into unstable
Former-commit-id: 4602f8c391409e9dd59f1fbee6a5ef011b219ca1
2019-07-19 00:01:56 -04:00
antirez
b2d03d4221 Make comment in getClientOutputBufferMemoryUsage() describing the present.
Former-commit-id: 35acae360a4c3c67370b03b4835c51b08194ca28
2019-07-18 23:12:39 -04:00
John Sully
5cb7ec841a Add support for sanitizers and fix issues they have found
Former-commit-id: 58971a430dd3e4e8c39c7b5288211bc2ba7699ed
2019-07-18 18:39:42 -04:00
John Sully
bd3cc0bb95 Resolve race on neterr variable
Former-commit-id: 1512274f4c51dc4e8f4e3d11df2f35e051c0c079
2019-07-18 17:11:28 -04:00
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