John Sully
47e7652611
Active Replicas should always use their own slaveseldb variable when sending/saving rdbs - never those of their masters. This is because the Active Replica is also simultaneously a master
...
Former-commit-id: bb090b6d20bfc3d5d3ca07270f64bf15fad42681
2019-07-18 20:50:20 -04:00
John Sully
727bda7108
remove unnecessary variables
...
Former-commit-id: a9c4e3970fd0d00896cb5500b2cc926ec3177bc4
2019-07-18 19:37:49 -04:00
John Sully
2110b84f7e
Fix issue #59 - Test replicaof config variable
...
Former-commit-id: d5ecc2347a717f6e6f938d81325476a9c3dff9a6
2019-07-18 19:22:49 -04:00
John Sully
7ba2941735
Add support for sanitizers and fix issues they have found
...
Former-commit-id: 58971a430dd3e4e8c39c7b5288211bc2ba7699ed
2019-07-18 18:39:42 -04:00
John Sully
e41ab66722
Resolve race on neterr variable
...
Former-commit-id: 1512274f4c51dc4e8f4e3d11df2f35e051c0c079
2019-07-18 17:11:28 -04:00
John Sully
aa560582b4
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
afa1a2e023
Suppress initialized data sanitizer warnings
...
Former-commit-id: ad32ba0343a241c46206ada273b0c0125e9e3101
2019-07-18 15:49:03 -04:00
antirez
5f450e4928
RDB: make sure to abort on LZF encoding error.
2019-07-18 18:59:38 +02:00
antirez
bd0f06c18c
RDB: handle encoding errors with rdbExitReportCorruptRDB().
...
Without such change, the diskless replicas, when loading RDB files from
the socket will not abort when a broken RDB file gets loaded. This is
potentially unsafe, because right now Redis is not able to guarantee
that encoding errors are safe from the POV of memory corruptions (for
instance the LZF library may not be safe against untrusted data?) so
better to abort when the RDB file we are going to load is corrupted.
Instead I/O errors are still returned to the caller without aborting,
so that in case of short read the diskless replica can try again.
2019-07-18 18:51:45 +02:00
Salvatore Sanfilippo
41ed85bd26
Merge pull request #6252 from soloestoy/tracking-flushdb
...
Tracking flushdb
2019-07-18 16:41:37 +02:00
antirez
947319cadd
RDB: update rdbLoadRio comment about EOF condition.
2019-07-18 12:37:55 +02:00
zhaozhao.zz
f59119aad6
Client side caching: filter clients untracking
2019-07-18 16:46:19 +08:00
John Sully
452ace5b95
Another RESP3 regression
...
Former-commit-id: 4e30a5b4e53a4d1580f8d7cca8a8eac11e36ce4d
2019-07-17 22:57:52 -04:00
antirez
42b6305964
RDB: try to make error handling code more readable.
2019-07-17 17:30:02 +02:00
antirez
6b72b04a37
Rio: when in error condition avoid doing the operation.
2019-07-17 16:46:22 +02:00
antirez
5189db3d81
RDB: modify rdbReportError() var name for clarity.
2019-07-17 16:46:22 +02:00
antirez
48d91cf4cc
Rio: remember read/write error conditions.
2019-07-17 16:46:22 +02:00
Oran Agra
c56b4ddc6f
prevent diskless replica from terminating on short read
...
now that replica can read rdb directly from the socket, it should avoid exiting
on short read and instead try to re-sync.
this commit tries to have minimal effects on non-diskless rdb reading.
and includes a test that tries to trigger this scenario on various read cases.
2019-07-17 16:46:22 +02:00
Oran Agra
56258c6b7d
Module API for Forking
...
* create module API for forking child processes.
* refactor duplicate code around creating and tracking forks by AOF and RDB.
* child processes listen to SIGUSR1 and dies exitFromChild in order to
eliminate a valgrind warning of unhandled signal.
* note that BGSAVE error reply has changed.
valgrind error is:
Process terminating with default action of signal 10 (SIGUSR1)
2019-07-17 16:40:24 +03:00
zhaozhao.zz
6191ea90a1
Client side caching: implement trackingInvalidateKeysOnFlush()
2019-07-17 20:33:52 +08:00
Oran Agra
6e07fac405
RM_Log - add support for logging without a context or context without module
...
for instance detached thread safe contexts, or various callbacks that don't
provide a context.
2019-07-17 15:08:18 +03:00
antirez
241d18d954
Merge branch 'unstable' of github.com:/antirez/redis into unstable
2019-07-17 12:26:38 +02:00
John Sully
cb58295ade
Fix Issue #58
...
Former-commit-id: c8516f3dc484920de4fc52acd72f5104d643ca87
2019-07-17 02:34:02 -04:00
John Sully
bc0c9054b2
Shared objects should be marked as such
...
Former-commit-id: aae0fdc11434fa76a1847eca9292c277b559730a
2019-07-16 18:32:01 -04:00
Salvatore Sanfilippo
5827b69861
Merge pull request #6185 from AlexRenCN/unstable
...
fix readme.md,Redis data types should add `t_stream.c`.
2019-07-16 18:33:55 +02:00
Salvatore Sanfilippo
4b2579a064
Merge pull request #5779 from madolson/dev-unstable-geo-bugfix
...
Fixed a rounding bug in geo.tcl
2019-07-15 23:41:57 +02:00
John Sully
79731e805a
Crash when aborting SYNC with a master on a thread other than main
...
Former-commit-id: a19d0f67b9fffefd9029b9a2ef3358b110302bbf
2019-07-15 14:55:41 -04:00
John Sully
bdc901f01c
Implement test mode to make finding bugs easier
...
Former-commit-id: 971f69fe1ff9cce50492a47f306b312457e50b9f
2019-07-15 14:55:18 -04:00
John Sully
a9500e5483
Blocked clients can stall when under low load
...
Former-commit-id: 7468c691ad04829c1fd3ae69f206946e8f38254a
2019-07-13 16:44:11 -04:00
John Sully
0dd9a27420
Give the active-rep more time to sync for test reliability
...
Former-commit-id: 620c2ec1412a3bcea5fecf21238caa065e73f3e9
2019-07-12 23:52:07 -04:00
John Sully
e78ed8cc64
Fix more locking deadlocks
...
Former-commit-id: 3081b6f98b5e7a9f3ef7cfe040236070398b081c
2019-07-12 23:51:45 -04:00
John Sully
8f1e7d9d5b
Fix deadlock with client and ae locks
...
Former-commit-id: 8630339e43c1de1cd723bdfdca8ab5924e2cb8b0
2019-07-12 20:46:50 -04:00
Salvatore Sanfilippo
3f1c84751a
Merge pull request #6196 from AngusP/resp3
...
[RESP3, Minor] in networking.c double representation for -infiinity leaves out comma
2019-07-12 13:08:46 +02:00
Salvatore Sanfilippo
6100a82a3a
Merge pull request #5738 from bmerry/fix-swapdb-int-overflow
...
Make dbSwapDatabases take args as long
2019-07-12 12:36:33 +02:00
antirez
54c4e7f86c
Vertically compact code in aofWrite().
2019-07-12 12:18:33 +02:00
John Sully
03d41318b0
Add Active Replication tests
...
Former-commit-id: 528d10091fda0d2c56674e825c4f70467587955f
2019-07-12 03:54:41 -04:00
John Sully
42143ac654
FIX: The dabase count configuration is not respected
...
Former-commit-id: 149c3cf3dd75e8058c7c560d6a7ffbbb95da3898
2019-07-12 02:13:37 -04:00
John Sully
9dbcfc9d24
Update README.md
...
Former-commit-id: f12c3cf9ddccedbafd7cde05fcabc5f47e5c58a3
2019-07-11 20:29:47 -04:00
John Sully
2a1d7890f6
Fix compile errors on GCC v5
...
Former-commit-id: 1f08a0efb33511ddc75c2acc62199bfcd0860137
2019-07-11 20:20:01 -04:00
John Sully
3498002d9e
Fix more accounting errors with active replication and the replication offset. Specifically we don't update repl_ack_off as frequently as we do reploff_skipped
...
Former-commit-id: 6cf85d1d01e56de0bb6e5d34590623cd8dabd32b
2019-07-11 19:20:12 -04:00
John Sully
0db39bcf9d
Active Replicas are not slaves
...
Former-commit-id: b5101a460dba56d6deac5b753d09d47d834eee4a
2019-07-11 18:51:20 -04:00
John Sully
361b7655ef
Fix active replication offset synchronization accounting, and enable the wait command
...
Former-commit-id: a5784ef09e71a9a45780a8f3dbab875b1f1fe1a5
2019-07-11 17:00:23 -04:00
antirez
2a99f199bc
Merge branch 'unstable' of github.com:/antirez/redis into unstable
2019-07-10 19:48:44 +02:00
antirez
dad0e916ff
Client side caching: filter clients no longer there.
2019-07-10 19:46:46 +02:00
Salvatore Sanfilippo
7567323071
Merge pull request #6198 from oranagra/skiplist-mem-usage
...
missing per-skiplist overheads in MEMORY USAGE
2019-07-10 19:43:24 +02:00
antirez
c7aaf8db4d
Client side caching: implement CLIENT GETREDIR.
...
This subcommand may simplify the writing of Redis client libraries
using the tracking feature and/or improve observability and debugging
capabilities.
2019-07-10 18:17:10 +02:00
antirez
923e4fb312
Client side caching: add tracking clients in INFO.
2019-07-10 18:08:31 +02:00
antirez
7c9f6ebc8f
Diskless replica: fix disklessLoadRestoreBackups() bug.
2019-07-10 12:36:26 +02:00
antirez
3bbb9a1413
Diskless replica: refactoring of DBs backups.
2019-07-10 11:42:26 +02:00
antirez
3300e98ff0
Diskless replica: fix mispelled var name.
2019-07-10 09:34:21 +02:00