summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Redis 4.0.3.4.0.3antirez2017-11-302-1/+203
|
* LFU: Fix LFUDecrAndReturn() to just decrement.antirez2017-11-301-13/+3
| | | | | Splitting the popularity in half actually just needs decrementing the counter because the counter is logarithmic.
* LFU: add hotkeys option to redis-clizhaozhao.zz2017-11-301-0/+135
|
* LFU: do some changes about LFU to find hotkeyszhaozhao.zz2017-11-304-19/+39
| | | | | | | | | | | | | | | | | | Firstly, use access time to replace the decreas time of LFU. For function LFUDecrAndReturn, it should only try to get decremented counter, not update LFU fields, we will update it in an explicit way. And we will times halve the counter according to the times of elapsed time than server.lfu_decay_time. Everytime a key is accessed, we should update the LFU including update access time, and increment the counter after call function LFUDecrAndReturn. If a key is overwritten, the LFU should be also updated. Then we can use `OBJECT freq` command to get a key's frequence, and LFUDecrAndReturn should be called in `OBJECT freq` command in case of the key has not been accessed for a long time, because we update the access time only when the key is read or overwritten.
* LFU: change lfu* parameters to intzhaozhao.zz2017-11-302-3/+3
|
* LFU: fix the missing of config get and rewritezhaozhao.zz2017-11-301-2/+6
|
* Update link to https and use inline linkFelix Krause2017-11-281-1/+1
|
* redis-cli.c typo: Requets -> Requests.Bo Cai2017-11-281-1/+1
| | | | Signed-off-by: Bo Cai <charpty@gmail.com>
* redis-cli.c typo: helpe -> helper.Bo Cai2017-11-281-1/+1
| | | | Signed-off-by: Bo Cai <charpty@gmail.com>
* Fix some typosSébastien Fievet2017-11-281-3/+3
|
* t_hash.c: clarify calling two times the same function.antirez2017-11-281-2/+2
|
* adlist: fix listJoin() in the case the second list is empty.antirez2017-11-281-1/+1
| | | | | | | See #4192, the original PR removed lines of code that are actually needed, so thanks to @chunqiulfq for reporting the problem, but merging solution from @jeesyn after checking, together with @artix75, that the logic covers all the cases.
* Correct spelling of "faield".Chris Lamb2017-11-281-1/+1
|
* Improve OBJECT HELP descriptions.antirez2017-11-281-2/+2
| | | | See #4472.
* Fix entry command table entry for OBJECT for HELP option.antirez2017-11-281-1/+1
| | | | After #4472 the command may have just 2 arguments.
* Adds `OBJECT help`Itamar Haber2017-11-281-3/+18
|
* Fix undefined behavior constant defined.David Carlier2017-11-282-2/+10
|
* Fix file descriptor leak and error handlingrouzier2017-11-281-3/+6
|
* Prevents `OBJECT freq` with `noeviction`Itamar Haber2017-11-271-2/+2
| | | | When maxmemory is set to noeviction, idletime is implicitly kept. This renders access frequency nonsensical.
* Adds -u <uri> option to redis-cli.Itamar Haber2017-11-271-0/+89
|
* Test: regression test for latency expire events logging bug.antirez2017-11-271-0/+14
| | | | Regression for #4452.
* expire & latency: fix the missing latency records generated by expirezhaozhao.zz2017-11-271-8/+11
|
* Modules: fix memory leak in RM_IsModuleNameBusy().antirez2017-11-241-7/+3
|
* PSYNC2: reorganize comments related to recent fixes.antirez2017-11-242-26/+24
| | | | Related to PR #4412 and issue #4407.
* PSYNC2: persist cached_master's dbid inside the RDBzhaozhao.zz2017-11-241-2/+16
|
* PSYNC2: make repl_stream_db never be -1zhaozhao.zz2017-11-241-9/+6
| | | | | | it means that after this change all the replication info in RDB is valid, and it can distinguish us from the older version.
* PSYNC2: clarify the scenario when repl_stream_db can be -1zhaozhao.zz2017-11-242-9/+21
|
* PSYNC2 & RDB: fix the missing rdbSaveInfo for BGSAVEzhaozhao.zz2017-11-241-1/+4
|
* PSYNC2: safe free backlog when reach the time limitzhaozhao.zz2017-11-241-0/+12
| | | | | | | | | | | | | When we free the backlog, we should use a new replication ID and clear the ID2. Since without backlog we can not increment master_repl_offset even do write commands, that may lead to inconsistency when we try to connect a "slave-before" master (if this master is our slave before, our replid equals the master's replid2). As the master have our history, so we can match the master's replid2 and second_replid_offset, that make partial sync work, but the data is inconsistent.
* Modules: handle the busy module namezhaozhao.zz2017-11-242-2/+19
|
* Modules: handle the conflict of registering commandszhaozhao.zz2017-11-241-21/+28
|
* fix string to double conversion, stopped parsing on \0 even if the string ↵Oran Agra2017-11-242-2/+9
| | | | | | | | | | | | | | | | | | | | | | has more data. getLongLongFromObject calls string2ll which has this line: /* Return if not all bytes were used. */ so if you pass an sds with 3 characters "1\01" it will fail. but getLongDoubleFromObject calls strtold, and considers it ok if eptr[0]==`\0` i.e. if the end of the string found by strtold ends with null terminator 127.0.0.1:6379> set a 1 OK 127.0.0.1:6379> setrange a 2 2 (integer) 3 127.0.0.1:6379> get a "1\x002" 127.0.0.1:6379> incrbyfloat a 2 "3" 127.0.0.1:6379> get a "3"
* Modules: fix for scripting replication of modules commands.antirez2017-11-232-7/+9
| | | | See issue #4466 / #4467.
* Nested MULTI/EXEC may replicate in different cases.Yossi Gottlieb2017-11-232-0/+10
| | | | | | | For example: 1. A module command called within a MULTI section. 2. A Lua script with replicate_commands() called within a MULTI section. 3. A module command called from a Lua script in the above context.
* rehash: handle one db until finishedzhaozhao.zz2017-11-211-2/+5
|
* fix boundary case for _dictNextPowerkmiku72017-11-081-1/+1
|
* Fixes an off-by-one in argument handling of `MEMORY USAGE`Itamar Haber2017-11-081-1/+1
| | | Fixes #4430
* SDS: improve sdsRemoveFreeSpace() to avoid useless data copy.antirez2017-11-081-5/+12
| | | | | | | | | | | | | Since SDS v2, we no longer have a single header, so the function to rewrite the SDS in terms of the minimum space required, instead of just using realloc() and let the underlying allocator decide what to do, was doing an allocation + copy every time the minimum possible header needed to represent the string was different than the current one. This could be often a bit wasteful, because if we go, for instance, from the 32 bit fields header to the 16 bit fields header, the overhead of the header is normally very small. With this commit we call realloc instead, unless the change in header size is very significant in relation to the string length.
* Fix saving of zero-length lists.antirez2017-11-061-2/+3
| | | | | | | | | | | | | | | Normally in modern Redis you can't create zero-len lists, however it's possible to load them from old RDB files generated, for instance, using Redis 2.8 (see issue #4409). The "Right Thing" would be not loading such lists at all, but this requires to hook in rdb.c random places in a not great way, for a problem that is at this point, at best, minor. Here in this commit instead I just fix the fact that zero length lists, materialized as quicklists with the first node set to NULL, were iterated in the wrong way while they are saved, leading to a crash. The other parts of the list implementation are apparently able to deal with empty lists correctly, even if they are no longer a thing.
* Fix buffer overflows occurring reading redis.conf.antirez2017-10-311-0/+3
| | | | | | | | | | | | | | | | | | | There was not enough sanity checking in the code loading the slots of Redis Cluster from the nodes.conf file, this resulted into the attacker's ability to write data at random addresses in the process memory, by manipulating the index of the array. The bug seems exploitable using the following techique: the config file may be altered so that one of the nodes gets, as node ID (which is the first field inside the structure) some data that is actually executable: then by writing this address in selected places, this node ID part can be executed after a jump. So it is mostly just a matter of effort in order to exploit the bug. In practice however the issue is not very critical because the bug requires an unprivileged user to be able to modify the Redis cluster nodes configuration, and at the same time this should result in some gain. However Redis normally is unprivileged as well. Yet much better to have this fixed indeed. Fix #4278.
* Regression test for issue #4391.antirez2017-10-301-0/+4
|
* More robust object -> double conversion.antirez2017-10-301-4/+8
| | | | | | | | | Certain checks were useless, at the same time certain malformed inputs were accepted without problems (emtpy strings parsed as zero). Cases where strtod() returns ERANGE but we still want to parse the input where ok in getDoubleFromObject() but not in the long variant. As a side effect of these fixes, this commit fixes #4391.
* Limit statement in RM_BlockClient() to 80 cols.antirez2017-10-041-4/+5
|
* Added safety net preventing redis from crashing if a module decide to block ↵Dvir Volk2017-10-041-5/+8
| | | | in MULTI
* Renamed GetCtxFlags to GetContextFlagsDvir Volk2017-10-043-11/+11
|
* Added support for module context flags with RM_GetCtxFlagsDvir Volk2017-10-043-0/+177
|
* Redis 4.0.2.4.0.2antirez2017-09-212-1/+84
|
* Clarify comment in change fixing #4323.antirez2017-09-211-2/+6
|
* Lazyfree: avoid memory leak when free slowlog entryzhaozhao.zz2017-09-211-2/+5
|
* PSYNC2: More refinements related to #4316.antirez2017-09-202-11/+14
|