- 15 Feb, 2021 5 commits
-
-
Oran Agra authored
There are two tests in other.tcl that were dependant of the sha1 package import which meant that they didn't usually run. The reason it was like that was that prior to the creation of DEBUG DIGEST, the test suite used to have an equivalent function, but that's no longer the case and this dependency isn't needed. The other change is to revert config changes done by the test before the test suite continues. can be useful if using `--host` to run multiple units against the same server
-
Yossi Gottlieb authored
-
Yossi Gottlieb authored
Fixes #8489
-
Oran Agra authored
this should make it timing independent and also faster in most cases
-
Viktor Söderqvist authored
The added flag affects the return value of RM_HashSet() to include the number of inserted fields, in addition to updated and deleted fields. errno is set on errors, tests are added and documentation updated.
-
- 14 Feb, 2021 1 commit
-
-
filipe oliveira authored
Fix the pointers to the slot hash tags in the case of prefixed commands usage i.e. AUTH / SELECT It adjusts the pointers to the slot hash tags in the case of prefixed commands usage as soon as we get the 1st reply (same like we already did for the random strings within the command )
-
- 11 Feb, 2021 2 commits
-
-
Yossi Gottlieb authored
* Don't run test script on non-Linux. * Verify that reported fds do indeed exist also in parent, to avoid false negatives on some systems (namely CentOS). Co-authored-by:
Andy Pan <panjf2000@gmail.com>
-
Yossi Gottlieb authored
We need to store replicas referenced by their announced address (IP or address). Before that, if hostnames were used and the IP address changed, duplicate entries would have been created.
-
- 10 Feb, 2021 2 commits
-
-
Yossi Gottlieb authored
The `resolve-hostnames` and `announce-hostnames` parameters were not specified correctly according to the new convention introduced by 1aad55b6.
-
filipe oliveira authored
- removes time sensitive checks from block on background tests during leak checks. - fix uninitialized variable on RedisModuleBlockedClient() when calling RM_BlockedClientMeasureTimeEnd() without RM_BlockedClientMeasureTimeStart()
-
- 09 Feb, 2021 3 commits
-
-
Madelyn Olson authored
Moved most static strings into the shared structure
-
Itamar Haber authored
-
WuYunlong authored
1. Rename 18-cluster-nodes-slots.tcl to 19-cluster-nodes-slots.tcl. it was conflicting with another test prefixed by 18 2. Release memory on exit in redis-cli.c. 3. Fix freeConvertedSds indentation.
-
- 08 Feb, 2021 5 commits
-
-
Huang Zw authored
Fix typo and some out of date comments
-
Yossi Gottlieb authored
* For consistency, use tclsh for the script as well * Ignore leaked fds that originate from grandparent process, since we only care about fds redis-sentinel itself is responsible for * Check every test iteration to catch problems early * Some cleanups, e.g. parameterization of file name, etc.
-
filipe oliveira authored
The test failed from time to time on Github actions. We think it's possible that on the module's blocking timeout time tracking test, the timeout is happening prior we issue the RedisModule_BlockedClientMeasureTimeStart(bc) on the background thread. If that is the case one possible solution is to increase the timeout. Increasing to 200ms to 500ms to see if nightly stops failing.
-
sundb authored
When (remaining == (total_size - index)), element will definitely be random to. But when rand() == RAND_MAX, the element will miss, this will trigger assert in serverAssert(ziplistRandomPairsUnique(zsetobj->ptr, count, keys, vals) == count).
-
Andy Pan authored
-
- 07 Feb, 2021 5 commits
-
-
Oran Agra authored
It is inefficient to repeatedly pick a single random element from a ziplist. For CASE4, which is when the user requested a low number of unique random picks from the collectoin, we used thta pattern. Now we use a different algorithm that picks unique elements from a ziplist, and guarentee no duplicate but doesn't provide random order (which is only needed in the non-unique random picks case) Unrelated changes: * change ziplist count and indexes variables to unsigned * solve compilation warnings about uninitialized vars in gcc 10.2 Co-authored-by:
xinluton <xinluton@qq.com>
-
Oran Agra authored
use SIGSTOP instead of DEBUG SLEEP, reduces the test time by some 2 seconds and avoids failures on slow machines
-
Oran Agra authored
Github started shifting some repositoreis to use ubuntu 20.04 by default tcl8.5 is missing in these, but 8.6 exists in both 20.04 and 18.04
-
Yossi Gottlieb authored
Dump the entire server log if a test failed, to easy troubleshooting with no access to log files.
-
Yossi Gottlieb authored
Disable certificate validation, making it possible to connect to servers without configuring full trust chain. The use of this option is insecure and makes the connection vulnerable to man in the middle attacks.
-
- 05 Feb, 2021 3 commits
-
-
Viktor Söderqvist authored
Without this fix, RM_ZsetRem can leave empty sorted sets which are not allowed to exist. Removing from a sorted set while iterating seems to work (while inserting causes failed assetions). RM_ZsetRangeEndReached is modified to return 1 if the key doesn't exist, to terminate iteration when the last element has been removed.
-
filipe oliveira authored
-
sundb authored
RAND* commands: fix risk of OOM panic in hash and zset, use fair random in hash, and add tests for even distribution to all (#8429) Changes to HRANDFIELD and ZRANDMEMBER: * Fix risk of OOM panic when client query a very big negative count (avoid allocating huge temporary buffer). * Fix uneven random distribution in HRANDFIELD with negative count (wasn't using dictGetFairRandomKey). * Add tests to check an even random distribution (HRANDFIELD, SRANDMEMBER, ZRANDMEMBER). Co-authored-by:
Oran Agra <oran@redislabs.com>
-
- 04 Feb, 2021 3 commits
-
-
Yang Bodong authored
Issue with new test due to longitude wraparound.
-
Yang Bodong authored
Fix errors of GEOSEARCH bybox search due to: 1. projection of the box to a trapezoid (when the meter box is converted to long / lat it's no longer a box). 2. width and height mismatch Changes: - New GEOSEARCH point in rectangle algorithm - Fix GEOSEARCH bybox width and height mismatch bug - Add GEOSEARCH bybox testing to the existing "GEOADD + GEORANGE randomized test" - Add new fuzzy test to stress test the bybox corners and edges - Add some tests for edge cases of the bybox algorithm Co-authored-by:
Oran Agra <oran@redislabs.com>
-
Yossi Gottlieb authored
-
- 03 Feb, 2021 1 commit
-
-
Yossi Gottlieb authored
* Add bash temporarily to allow sentinel fd leaks test to run. * Use vmactions-freebsd rdist sync to work around bind permission denied and slow execution issues. * Upgrade to tcl8.6 to be aligned with latest Ubuntu envs. * Concat all command executions to avoid ignoring failures. * Skip intensive fuzzer on FreeBSD. For some yet unknown reason, generate_fuzzy_traffic_on_key causes TCL to significantly bloat on FreeBSD resulting with out of memory.
-
- 02 Feb, 2021 3 commits
-
-
Jonah H. Harris authored
This commit provides an optimization, in terms of time, for all GEORADIUS* and GEOSEARCH* searches which utilize the default, sorted, COUNT clause. This is commonly used for nearest-neighbor (top-K points closest to a given lat/lon) searches. While the previous implementation appends all matching points to the geoPoint array and performs pruning after-the-fact via a full sort and [0, count)-based for-loop, this PR sorts only the required number of elements. This optimization provides a 5-20% improvement in runtime depending on the density of points of interest (POI) as well as the radius searched. No performance degradation has been observed.
-
Huang Zw authored
addReplyLongLongWithPrefix, has a check against negative length, and the code flow removed in this commit bypasses the check. addReplyAggregateLen has an assertion for negative length, but addReplyBulkLen does not, so this commit fixes theoretical case of access violation (probably unreachable though)
-
zhaozhao.zz authored
This bug would have let users observe logically expired keys on replicas and during CLIENT PAUSE WRITE.
-
- 31 Jan, 2021 3 commits
-
-
Oran Agra authored
-
Oran Agra authored
These tests are not yet stable. on github actions they show some false leaks.
-
Oran Agra authored
* The corrupt dump fuzzer found a division by zero. * in some cases the random fields from the HRANDFIELD tests produced fields with newlines and other special chars (due to \ char), this caused the TCL tests to see a bulk response that has a newline in it and add {} around it, later it can think this is a nested list. in fact the `alpha` random string generator isn't using spaces and newlines, so it should not use `\` either.
-
- 30 Jan, 2021 1 commit
-
-
Wen Hui authored
This commit fixes sentinel announces hostnames test error in certain linux environment Before this commit, we only check localhost is resolved into 127.0.0.1, however in ubuntu or some other linux environments "localhost" will be resolved into ::1 ipv6 address first if the network stack is capable.
-
- 29 Jan, 2021 3 commits
-
-
filipe oliveira authored
Enabled background and reply time tracking on blocked on keys/blocked on background work clients (#7491) This commit enables tracking time of the background tasks and on replies, opening the door for properly tracking commands that rely on blocking / background work via the slowlog, latency history, and commandstats. Some notes: - The time spent blocked waiting for key changes, or blocked on synchronous replication is not accounted for. - **This commit does not affect latency tracking of commands that are non-blocking or do not have background work.** ( meaning that it all stays the same with exception to `BZPOPMIN`,`BZPOPMAX`,`BRPOP`,`BLPOP`, etc... and module's commands that rely on background threads ). - Specifically for latency history command we've added a new event class named `command-unblocking` that will enable latency monitoring on commands that spawn background threads to do the work. - For blocking commands we're now considering the total time of a command as the time spent on call() + the time spent on replying when unblocked. - For Modules commands that rely on background threads we're now considering the total time of a command as the time spent on call (main thread) + the time spent on the background thread ( if marked within `RedisModule_MeasureTimeStart()` and `RedisModule_MeasureTimeEnd()` ) + the time spent on replying (main thread) To test for this feature we've added a `unit/moduleapi/blockonbackground` test that relies on a module that blocks the client and sleeps on the background for a given time. - check blocked command that uses RedisModule_MeasureTimeStart() is tracking background time - check blocked command that uses RedisModule_MeasureTimeStart() is tracking background time even in timeout - check blocked command with multiple calls RedisModule_MeasureTimeStart() is tracking the total background time - check blocked command without calling RedisModule_MeasureTimeStart() is not reporting background time
-
Yang Bodong authored
New commands: `HRANDFIELD [<count> [WITHVALUES]]` `ZRANDMEMBER [<count> [WITHSCORES]]` Algorithms are similar to the one in SRANDMEMBER. Both return a simple bulk response when no arguments are given, and an array otherwise. In case values/scores are requested, RESP2 returns a long array, and RESP3 a nested array. note: in all 3 commands, the only option that also provides random order is the one with negative count. Changes to SRANDMEMBER * Optimization when count is 1, we can use the more efficient algorithm of non-unique random * optimization: work with sds strings rather than robj Other changes: * zzlGetScore: when zset needs to convert string to double, we use safer memcpy (in case the buffer is too small) * Solve a "bug" in SRANDMEMBER test: it intended to test a positive count (case 3 or case 4) and by accident used a negative count Co-authored-by:
xinluton <xinluton@qq.com> Co-authored-by:
Oran Agra <oran@redislabs.com>
-
zhaozhao.zz authored
The key point is how to recover from last AOF write error, for example: 1. start redis with appendonly yes, and append some write commands 2. short write or something else error happen, `server.aof_last_write_status` changed to `C_ERR`, now redis doesn't accept write commands 3. execute `CONFIG SET appendonly no` to avoid the above problem, now redis can accept write commands again 4. disk error resolved, and execute `CONFIG SET appendonly yes` to reopen AOF, but `server.aof_last_write_status` cannot be changed to `C_OK` (if background aof rewrite run less then 1 second, it will free `server.aof_buf` and then serverCron cannot fix `aof_last_write_status`), then redis cannot accept write commands forever. This PR use a simple way to fix it: 1. just free `server.aof_buf` when stop appendonly to save memory, if error happens in `flushAppendOnlyFile(1)`, the `server.aof_buf` may contains some data which has not be written to aof, I think we can ignore it because we turn off the appendonly. 2. reset fsync status after stop appendonly and call `flushAppendOnlyFile` only when `aof_state` is ON 3. reset `server.last_write_status` when reopen aof to accept write commands
-