redict/tests/unit
Meir Shpilraien (Spielrein) 61baabd8d5
Fix crash on RM_Call with script mode. (#10886)
The PR fixes 2 issues:

### RM_Call crash on script mode

`RM_Call` can potentially be called from a background thread where `server.current_client`
are not set. In such case we get a crash on `NULL` dereference.
The fix is to check first if `server.current_client` is `NULL`, if it does we should
verify disc errors and readonly replica as we do to any normal clients (no masters nor AOF).

### RM_Call block OOM commands when not needed

Again `RM_Call` can be executed on a background thread using a `ThreadSafeCtx`.
In such case `server.pre_command_oom_state` can be irrelevant and should not be
considered when check OOM state. This cause OOM commands to be blocked when
not necessarily needed.

In such case, check the actual used memory (and not the cached value). Notice that in
order to know if the cached value can be used, we check that the ctx that was used on
the `RM_Call` is a ThreadSafeCtx. Module writer can potentially abuse the API and use
ThreadSafeCtx on the main thread. We consider this as a API miss used.
2022-06-21 10:01:13 +03:00
..
moduleapi Fix crash on RM_Call with script mode. (#10886) 2022-06-21 10:01:13 +03:00
type optimize zset conversion on large ZRANGESTORE (#10789) 2022-06-14 21:12:45 +03:00
acl-v2.tcl Fix incorrect error code for eval scripts and fix test error checking (#10575) 2022-04-14 11:18:32 +03:00
acl.tcl Fix bugs in CONFIG REWRITE, omitting rename-command and include lines, and inserting comments around module and acl configs (#10761) 2022-06-02 08:36:55 +03:00
aofrw.tcl Functions: Move library meta data to be part of the library payload. (#10500) 2022-04-05 10:27:24 +03:00
auth.tcl Fix incorrect error code for eval scripts and fix test error checking (#10575) 2022-04-14 11:18:32 +03:00
bitfield.tcl Improve test suite to handle external servers better. (#9033) 2021-06-09 15:13:24 +03:00
bitops.tcl Run large-memory tests as solo. (#10626) 2022-04-24 17:29:35 +03:00
client-eviction.tcl Introduce debug command to disable reply buffer resizing (#10360) 2022-03-01 14:40:29 +02:00
cluster-scripting.tcl By default prevent cross slot operations in functions and scripts with # (#10615) 2022-04-26 12:09:21 +03:00
cluster.tcl Functions: Move library meta data to be part of the library payload. (#10500) 2022-04-05 10:27:24 +03:00
dump.tcl Improve test suite to handle external servers better. (#9033) 2021-06-09 15:13:24 +03:00
expire.tcl sub-command support for ACL CAT and COMMAND LIST. redisCommand always stores fullname (#10127) 2022-01-23 10:05:06 +02:00
functions.tcl Expose script flags to processCommand for better handling (#10744) 2022-06-01 14:09:40 +03:00
geo.tcl Fix incorrect error code for eval scripts and fix test error checking (#10575) 2022-04-14 11:18:32 +03:00
hyperloglog.tcl Improve test suite to handle external servers better. (#9033) 2021-06-09 15:13:24 +03:00
info-command.tcl Make INFO command variadic (#6891) 2022-02-08 13:14:42 +02:00
info.tcl Fix error stats and failed command stats for blocked clients (#10309) 2022-02-21 11:20:41 +02:00
introspection-2.tcl Fixed SET and BITFIELD commands being wrongly marked movablekeys (#10837) 2022-06-12 08:22:18 +03:00
introspection.tcl rewrite alias config to original name (#10811) 2022-06-02 14:03:47 +03:00
keyspace.tcl Add external test that runs without debug command (#9964) 2021-12-19 17:41:51 +02:00
latency-monitor.tcl sub-command support for ACL CAT and COMMAND LIST. redisCommand always stores fullname (#10127) 2022-01-23 10:05:06 +02:00
lazyfree.tcl attempt to fix tracking test issue with external tests due to lazy free (#9722) 2021-11-02 16:42:53 +02:00
limits.tcl Improve test suite to handle external servers better. (#9033) 2021-06-09 15:13:24 +03:00
maxmemory.tcl Added INFO LATENCYSTATS section: latency by percentile distribution/latency by cumulative distribution of latencies (#9462) 2022-01-05 14:01:05 +02:00
memefficiency.tcl Fix typo "the the" (#10399) 2022-03-09 13:55:17 +02:00
multi.tcl Fix timing issue in EXEC fail on lazy expired WATCHed key test (#10332) 2022-02-23 08:47:16 +02:00
networking.tcl Protected configs and sensitive commands (#9920) 2021-12-19 10:46:16 +02:00
obuf-limits.tcl Added INFO LATENCYSTATS section: latency by percentile distribution/latency by cumulative distribution of latencies (#9462) 2022-01-05 14:01:05 +02:00
oom-score-adj.tcl Return 0 when config set out-of-range oom-score-adj-values (#10601) 2022-04-19 11:31:15 +03:00
other.tcl FLUSHDB and FLUSHALL add call forceCommandPropagation / FLUSHALL reset dirty counter to 0 if we enable save (#10691) 2022-05-11 11:21:16 +03:00
pause.tcl Expose script flags to processCommand for better handling (#10744) 2022-06-01 14:09:40 +03:00
pendingquerybuf.tcl Introduce memory management on cluster link buffers (#9774) 2021-12-16 21:56:59 -08:00
printver.tcl Print version info before running the test 2011-05-20 11:44:54 +02:00
protocol.tcl add test suite infra to test RESP3 attributes (#10247) 2022-02-07 00:10:05 +02:00
pubsub.tcl Keyspace event for new keys (#10512) 2022-04-13 11:36:38 +03:00
pubsubshard.tcl Sharded pubsub publish messagebulk as smessage (#10792) 2022-05-31 08:03:59 +03:00
querybuf.tcl Ignore resize threshold on idle qbuf resizing (#9322) 2021-08-06 20:50:34 +03:00
quit.tcl Add tests for OK on QUIT 2010-10-15 12:54:53 +02:00
replybufsize.tcl Introduce debug command to disable reply buffer resizing (#10360) 2022-03-01 14:40:29 +02:00
scan.tcl Replace all usage of ziplist with listpack for t_zset (#9366) 2021-09-09 18:18:53 +03:00
scripting.tcl Script that made modification will not break with unexpected NOREPLICAS error (#10855) 2022-06-14 21:09:50 +03:00
shutdown.tcl unblockClient: avoid to reset client when the client was shutdown-blocked (#10440) 2022-03-20 15:18:53 +02:00
slowlog.tcl Fix timing issue in slowlog redact test (#10614) 2022-04-24 12:16:30 +03:00
sort.tcl Add SORT_RO command (#9299) 2021-08-09 09:40:29 +03:00
tls.tcl Add support for reading encrypted keyfiles. (#8644) 2021-03-22 13:27:46 +02:00
tracking.tcl Add readonly flag to EVAL_RO, EVALSHA_RO and FCALL_RO (#10728) 2022-05-29 23:42:56 -07:00
violations.tcl Run large-memory tests as solo. (#10626) 2022-04-24 17:29:35 +03:00
wait.tcl Improve test suite to handle external servers better. (#9033) 2021-06-09 15:13:24 +03:00