antirez
b2d03d4221
Make comment in getClientOutputBufferMemoryUsage() describing the present.
...
Former-commit-id: 35acae360a4c3c67370b03b4835c51b08194ca28
2019-07-18 23:12:39 -04:00
antirez
271db42742
Fix test false positive introduced by threaded I/O.
...
Now clients that are ready to be terminated asynchronously are processed
more often in beforeSleep() instead of being processed in serverCron().
This means that the test will not be able to catch the moment the client
was terminated, also note that the 'omem' figure now changes in big
steps, because of the new client output buffers layout.
So we have to change the test range in order to accomodate for that.
Yet the test is useful enough to be worth taking, even if its precision
is reduced by this commit. Probably if we get more problems, a thing
that makes sense is just to check that the limit is < 200k. That's more
than enough actually.
Former-commit-id: 8aaa8b0b116dc86473b6a94bf2ff330dd4163ca1
2019-07-18 23:12:05 -04:00
John Sully
cfee6376d2
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
133650ac7d
remove unnecessary variables
...
Former-commit-id: a9c4e3970fd0d00896cb5500b2cc926ec3177bc4
2019-07-18 19:37:49 -04:00
John Sully
594559b45e
Fix issue #59 - Test replicaof config variable
...
Former-commit-id: d5ecc2347a717f6e6f938d81325476a9c3dff9a6
2019-07-18 19:22:49 -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
ce595a9287
Suppress initialized data sanitizer warnings
...
Former-commit-id: ad32ba0343a241c46206ada273b0c0125e9e3101
2019-07-18 15:49:03 -04:00
antirez
b8d5518787
RDB: make sure to abort on LZF encoding error.
2019-07-18 18:59:38 +02:00
antirez
a345fef285
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
344f46380f
Merge pull request #6252 from soloestoy/tracking-flushdb
...
Tracking flushdb
2019-07-18 16:41:37 +02:00
antirez
db69845b48
RDB: update rdbLoadRio comment about EOF condition.
2019-07-18 12:37:55 +02:00
zhaozhao.zz
996dcae44f
Client side caching: filter clients untracking
2019-07-18 16:46:19 +08:00
John Sully
48e44624c3
Another RESP3 regression
...
Former-commit-id: 4e30a5b4e53a4d1580f8d7cca8a8eac11e36ce4d
2019-07-17 22:57:52 -04:00
antirez
72b7b904c1
RDB: try to make error handling code more readable.
2019-07-17 17:30:02 +02:00
antirez
94186a607e
Rio: when in error condition avoid doing the operation.
2019-07-17 16:46:22 +02:00
antirez
ecf5d7a662
RDB: modify rdbReportError() var name for clarity.
2019-07-17 16:46:22 +02:00
antirez
363b131aff
Rio: remember read/write error conditions.
2019-07-17 16:46:22 +02:00
Oran Agra
73a945c73c
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
e70fbad802
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
8d5e3b7893
Client side caching: implement trackingInvalidateKeysOnFlush()
2019-07-17 20:33:52 +08:00
Oran Agra
e0387b30f2
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
9d4867e671
Merge branch 'unstable' of github.com:/antirez/redis into unstable
2019-07-17 12:26:38 +02:00
John Sully
f71f79af8e
Fix Issue #58
...
Former-commit-id: c8516f3dc484920de4fc52acd72f5104d643ca87
2019-07-17 02:34:02 -04:00
John Sully
5cbb1ed5f9
Shared objects should be marked as such
...
Former-commit-id: aae0fdc11434fa76a1847eca9292c277b559730a
2019-07-16 18:32:01 -04:00
Salvatore Sanfilippo
ce31de0e43
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
89e00762e7
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
20cfb91f3f
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
add714913b
Implement test mode to make finding bugs easier
...
Former-commit-id: 971f69fe1ff9cce50492a47f306b312457e50b9f
2019-07-15 14:55:18 -04:00
John Sully
b82cf7f034
Blocked clients can stall when under low load
...
Former-commit-id: 7468c691ad04829c1fd3ae69f206946e8f38254a
2019-07-13 16:44:11 -04:00
John Sully
0f5b59241f
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
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
Salvatore Sanfilippo
ee8b42cb27
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
3829c2c768
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
d2307852ed
Vertically compact code in aofWrite().
2019-07-12 12:18:33 +02:00
John Sully
3ffe5b5dde
Add Active Replication tests
...
Former-commit-id: 528d10091fda0d2c56674e825c4f70467587955f
2019-07-12 03:54:41 -04:00
John Sully
e29c6d0ac9
FIX: The dabase count configuration is not respected
...
Former-commit-id: 149c3cf3dd75e8058c7c560d6a7ffbbb95da3898
2019-07-12 02:13:37 -04:00
John Sully
0da2d91659
Update README.md
...
Former-commit-id: f12c3cf9ddccedbafd7cde05fcabc5f47e5c58a3
2019-07-11 20:29:47 -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
f0e17a7d04
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
2bccf7adbf
Active Replicas are not slaves
...
Former-commit-id: b5101a460dba56d6deac5b753d09d47d834eee4a
2019-07-11 18:51:20 -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
antirez
d9bdda8850
Merge branch 'unstable' of github.com:/antirez/redis into unstable
2019-07-10 19:48:44 +02:00
antirez
effe7022e6
Client side caching: filter clients no longer there.
2019-07-10 19:46:46 +02:00
Salvatore Sanfilippo
f3884866c5
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
c3d91f5d8b
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
00f56990ef
Client side caching: add tracking clients in INFO.
2019-07-10 18:08:31 +02:00
antirez
ecd65cf9cf
Diskless replica: fix disklessLoadRestoreBackups() bug.
2019-07-10 12:36:26 +02:00