Oran Agra
1333a46b7e
fix maxmemory config warning
...
the warning condition was if usage > limit (saying it'll cause eviction
or oom), but in fact the eviction and oom depends on used minus slave
buffers.
other than fixing the condition, i add info about the current usage and
limit, which may be useful when looking at the log.
2020-02-12 14:17:40 +01:00
Oran Agra
8e7282eb3e
Fix client flags to be int64 in module.c
...
currently there's no bug since the flags these functions handle are
always lower than 32bit, but still better fix the type to prevent future
bugs.
2020-02-12 14:17:40 +01:00
Oran Agra
a678390e52
moduleRDBLoadError, add key name, and use panic rather than exit
...
using panic rather than exit means you get s stack trace of the code
path that experianced the error, and possibly other info.
2020-02-12 14:17:40 +01:00
Oran Agra
f42ce57d0f
stopAppendOnly resets aof_rewrite_scheduled
...
althouh in theory, users can do BGREWRITEAOF even if aof is disabled, i
suppose it is more common that the scheduled flag is set by either
startAppendOnly, of a failed initial AOFRW fork (AOF_WAIT_REWRITE)
2020-02-12 14:15:56 +01:00
Oran Agra
919fbf421d
reduce repeated calls to use_diskless_load
...
this function possibly iterates on the module list
2020-02-12 14:15:56 +01:00
Oran Agra
df096bc96b
add SAVE subcommand to ACL HELP and top comment
2020-02-12 14:15:56 +01:00
Oran Agra
22e45d46fe
freeClientAsync don't lock mutex if there's just one thread
2020-02-12 14:15:56 +01:00
Oran Agra
a55e584706
DEBUG HELP - add PROTOCOL
2020-02-12 14:15:56 +01:00
Oran Agra
ba28924418
move restartAOFAfterSYNC from replicaofCommand to replicationUnsetMaster
...
replicationUnsetMaster can be called from other places, not just
replicaofCOmmand, and all of these need to restart AOF
2020-02-12 14:15:56 +01:00
Guy Benoish
5a6cfbf4ca
Some refactroing using getClientType instead of CLIENT_SLAVE
2020-02-12 14:15:56 +01:00
Guy Benoish
fae306b374
Fix small bugs related to replica and monitor ambiguity
...
1. server.repl_no_slaves_since can be set when a MONITOR client disconnects
2. c->repl_ack_time can be set by a newline from a MONITOR client
3. Improved comments
2020-02-12 14:15:56 +01:00
Yossi Gottlieb
736309660f
TLS: Some redis.conf clarifications.
2020-02-12 14:15:56 +01:00
Oran Agra
488e194787
config.c verbose error replies for CONFIG SET, like config file parsing
...
We noticed that the error replies for the generic mechanism for enums
are very verbose for config file parsing, but not for config set
command.
instead of replicating this code, i did a small refactoring to share
code between CONFIG SET and config file parsing.
and also renamed the enum group functions to be consistent with the
naming of other types.
2020-02-12 14:15:56 +01:00
Oran Agra
c82ccf0670
memoryGetKeys helper function so that ACL can limit access to keys for MEMORY command
2020-02-12 14:15:56 +01:00
antirez
51c1a9f8fb
ACL LOG: make max log entries configurable.
2020-02-12 14:15:35 +01:00
antirez
ea1e1b12c9
ACL LOG: test for AUTH reason.
2020-02-12 14:15:35 +01:00
antirez
7379c78a9b
ACL LOG: log failed auth attempts.
2020-02-12 14:15:35 +01:00
antirez
9f6e84f6be
ACL LOG: implement a few basic tests.
2020-02-12 14:15:35 +01:00
antirez
82790e510f
ACL LOG: also log ACL errors in the scripting/MULTI ctx.
2020-02-12 14:15:35 +01:00
antirez
943008ebac
ACL LOG: implement LOG RESET.
2020-02-12 14:15:35 +01:00
antirez
e271a61103
ACL LOG: group similar entries in a given time delta.
2020-02-12 14:15:35 +01:00
antirez
f1974d5d67
ACL LOG: actually emit entries.
2020-02-12 14:15:35 +01:00
antirez
d9b153c9f6
ACL LOG: implement ACL LOG subcommadn skeleton.
2020-02-12 14:15:35 +01:00
antirez
577fc4388b
ACL LOG: data structures and initial functions.
2020-02-12 14:15:35 +01:00
John Sully
d1885547f2
Merge branch 'unstable' into redis_6_merge
...
Former-commit-id: 329519d4aa230a9f7f2d3b82158f8cafcbbd6952
2020-02-11 03:48:08 -05:00
John Sully
da293758fc
Fix race condition in allocating connections to threads
...
Former-commit-id: 52434a583aa7114ff5658226441ab82ed3110a57
2020-02-11 03:44:28 -05:00
John Sully
ee99605def
Merge branch 'unstable' into redis_6_merge
...
Former-commit-id: 18a5f46b6138e8a975dda0ed4897d19eed756d24
2020-02-11 02:39:08 -05:00
John Sully
e30630d53b
Implement an error handler so bug #125 can't happen
...
Former-commit-id: 16a019dba053fd0654116ff98a2ad0b66a9ed4e6
2020-02-11 01:41:00 -05:00
John Sully
3282d4114f
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
47acc74247
Fix cases where duplicate RREPLAY is applied
...
Former-commit-id: c3317686f8b8d94a3b2295def899ae30e208f327
2020-02-11 00:59:07 -05:00
John Sully
3f62860342
Fix issue #119
...
Former-commit-id: 46224721237616c345f6726b721a354d7bda71df
2020-02-10 19:52:57 -05:00
John Sully
5a71721610
Fix memory leak in cron
...
Former-commit-id: f1748f8c7611ad96d7ba4fed66439cd1f043e6f3
2020-02-10 18:26:04 -05:00
John Sully
9dc9707693
Add missing test file
...
Former-commit-id: 0c101dccc825668cb7ff07c23e82db0f5642b786
2020-02-10 18:15:29 -05:00
John Sully
66925e9a54
CLANG build fix
...
Former-commit-id: dc78bf1ccbd3dfd2de582d2a0d0be3223de3c7c3
2020-02-10 00:29:26 -05:00
John Sully
9cd3b8253d
Ensure multi-master works for ring topologies
...
Former-commit-id: a7cc3aac28ccec4dadb80aa2cc7279c53982bc28
2020-02-10 00:25:03 -05:00
John Sully
e05f9de395
Merge branch 'unstable' of https://github.com/JohnSully/KeyDB into unstable
...
Former-commit-id: 339631530a5e18af7ad53f1a3df03d24085f9450
2020-02-09 02:25:20 -05:00
John Sully
6d25bd9f47
Addmissing test file
...
Former-commit-id: fb2bdf7d05e27b15dcb53b09d6820416a99a3ba7
2020-02-08 16:49:41 -05:00
John Sully
70cb1df72a
merge 5.0 unstable
...
Former-commit-id: c45f1328ac82fa9ebc8731314b40bd059ea45b6f
2020-02-07 16:45:59 -05:00
John Sully
a5a736be73
Fix issue #137 and #132
...
Former-commit-id: 050d58007f84e4f71b0ae8b053ae4d6fd5bb4ec7
2020-02-06 23:31:31 -05:00
John Sully
a21c81c30e
Add test to detect issue #137 and #132
...
Former-commit-id: 49d86746edef497a568c6f3a64695d420305cca8
2020-02-06 23:31:12 -05:00
Guy Benoish
6fe55c2f29
ld2string should fail if string contains \0 in the middle
...
This bug affected RM_StringToLongDouble and HINCRBYFLOAT.
I added tests for both cases.
Main changes:
1. Fixed string2ld to fail if string contains \0 in the middle
2. Use string2ld in getLongDoubleFromObject - No point of
having duplicated code here
The two changes above broke RM_SaveLongDouble/RM_LoadLongDouble
because the long double string was saved with length+1 (An innocent
mistake, but it's actually a bug - The length passed to
RM_SaveLongDouble should not include the last \0).
2020-02-04 10:23:48 +01:00
Leo Murillo
f7a94526dd
Set ZSKIPLIST_MAXLEVEL to optimal value given 2^64 elements and p=0.25
2020-02-04 10:23:48 +01:00
antirez
bbce3ba974
Add more info in the unblockClientFromModule() function.
2020-02-04 10:23:48 +01:00
WuYunlong
eecfa9793e
Fix lua related memory leak.
2020-02-04 10:23:48 +01:00
Guy Benoish
40295fb3fe
Modules: Fix blocked-client-related memory leak
...
If a blocked module client times-out (or disconnects, unblocked
by CLIENT command, etc.) we need to call moduleUnblockClient
in order to free memory allocated by the module sub-system
and blocked-client private data
Other changes:
Made blockedonkeys.tcl tests a bit more aggressive in order
to smoke-out potential memory leaks
2020-02-04 10:23:48 +01:00
WuYunlong
d2509811b7
Add tcl regression test in scripting.tcl to reproduce memory leak.
2020-02-04 10:23:48 +01:00
Yossi Gottlieb
29d4a1502a
TLS: Fix missing initialization in redis-cli.
2020-02-04 10:23:48 +01:00
Oran Agra
ec0c61da05
fix uninitialized info_cb var in module.c
2020-02-04 10:23:48 +01:00
John Sully
46506b3e53
module fixes
...
Former-commit-id: ef4e11ecb8a6f1a05bb21f014120b0ef9e771b60
2020-02-04 01:22:25 -05:00
John Sully
c2eb10c322
Fix cluster test failures from Redis 6 merge
...
Former-commit-id: fd702e43f19ac2b8097afef84a73c8e71172979b
2020-02-03 20:00:09 -05:00