summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Modules: fix for scripting replication of modules commands.modules-replicationantirez2017-11-232-5/+7
| | | | See issue #4466 / #4467.
* rehash: handle one db until finishedzhaozhao.zz2017-11-211-2/+5
|
* Merge pull request #2741 from kmiku7/unstableSalvatore Sanfilippo2017-11-081-1/+1
|\ | | | | fix boundary case for _dictNextPower
| * fix boundary case for _dictNextPowerkmiku72015-08-231-1/+1
| |
* | Merge pull request #4431 from itamarhaber/patch-10Salvatore Sanfilippo2017-11-081-1/+1
|\ \ | | | | | | Fixes an off-by-one in argument handling of `MEMORY USAGE`
| * | Fixes an off-by-one in argument handling of `MEMORY USAGE`Itamar Haber2017-11-081-1/+1
|/ / | | | | Fixes #4430
* | 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.
* | SDS: improve sdsRemoveFreeSpace() to avoid useless data copy.antirez2017-11-031-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 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-09-281-4/+5
| |
* | Merge pull request #4337 from dvirsky/module_ctx_flagsSalvatore Sanfilippo2017-09-283-5/+185
|\ \ | | | | | | Module Context flags
| * | Added safety net preventing redis from crashing if a module decide to block ↵Dvir Volk2017-09-271-5/+8
| | | | | | | | | | | | in MULTI
| * | Renamed GetCtxFlags to GetContextFlagsDvir Volk2017-09-273-11/+11
| | |
| * | Added support for module context flags with RM_GetCtxFlagsDvir Volk2017-09-273-0/+177
|/ /
* | Clarify comment in change fixing #4323.antirez2017-09-211-2/+6
| |
* | Merge pull request #4324 from soloestoy/lazyfree-fix-memory-leakSalvatore Sanfilippo2017-09-211-2/+5
|\ \ | | | | | | Lazyfree: avoid memory leak when free slowlog entry
| * | Lazyfree: avoid memory leak when free slowlog entryzhaozhao.zz2017-09-211-2/+5
|/ /
* | PSYNC2: More refinements related to #4316.psync2-rdb-fixesantirez2017-09-202-11/+14
| |
* | PSYNC2: make persisiting replication info more solidzhaozhao.zz2017-09-204-9/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit is a reinforcement of commit c1c99e9. 1. Replication information can be stored when the RDB file is generated by a mater using server.slaveseldb when server.repl_backlog is not NULL, or set repl_stream_db be -1. That's safe, because NULL server.repl_backlog will trigger full synchronization, then master will send SELECT command to replicaiton stream. 2. Only do rdbSave* when rsiptr is not NULL, if we do rdbSave* without rdbSaveInfo, slave will miss repl-stream-db. 3. Save the replication informations also in the case of SAVE command, FLUSHALL command and DEBUG reload.
* | PSYNC2: Fix the way replication info is saved/loaded from RDB.antirez2017-09-194-23/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit attempts to fix a number of bugs reported in #4316. They are related to the way replication info like replication ID, offsets, and currently selected DB in the master client, are stored and loaded by Redis. In order to avoid inconsistencies the changes in this commit try to enforce that: 1. Replication information are only stored when the RDB file is generated by a slave that has a valid 'master' client, so that we can always extract the currently selected DB. 2. When replication informations are persisted in the RDB file, all the info for a successful PSYNC or nothing is persisted. 3. The RDB replication informations are only loaded if the instance is configured as a slave, otherwise a master can start with IDs that relate to a different history of the data set, and stil retain such IDs in the future while receiving unrelated writes.
* | Merge branch 'unstable' of github.com:/antirez/redis into unstableantirez2017-09-192-3/+2
|\ \
| * \ Merge pull request #3785 from GitHubMota/unstableSalvatore Sanfilippo2017-09-181-2/+2
| |\ \ | | | | | | | | redis-benchmark: default value size usage update.
| | * | redis-benchmark: default value size usage update.Mota2017-07-251-2/+2
| | | | | | | | | | | | | | | | default size of SET/GET value in usage should be 3 bytes as in main code.
| * | | Merge pull request #3554 from jybaek/Delete_duplicateSalvatore Sanfilippo2017-09-181-1/+0
| |\ \ \ | | | | | | | | | | Remove Duplicate Processing
| | * | | Remove Duplicate Processingjybaek2016-10-131-1/+0
| | | | |
* | | | | PSYNC2: Create backlog on slave partial sync as well.antirez2017-09-191-0/+5
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A slave may be started with an RDB file able to provide enough slave to perform a successful partial SYNC with its master. However in such a case, how outlined in issue #4268, the slave backlog will not be started, since it was only initialized on full syncs attempts. This creates different problems with successive PSYNC attempts that will always result in full synchronizations. Thanks to @fdingiit for discovering the issue.
* | | | Merge pull request #4311 from oranagra/aof_shutdown_flushSalvatore Sanfilippo2017-09-181-1/+2
|\ \ \ \ | | | | | | | | | | Flush append only buffers before existing.
| * | | | Flush append only buffers before existing.Oran Agra2017-09-171-1/+2
|/ / / / | | | | | | | | | | | | | | | | | | | | when SHUTDOWN command is recived it is possible that some of the recent command were not yet flushed from the AOF buffer, and the server experiences data loss at shutdown.
* | | | Merge pull request #4191 from jybaek/unstableSalvatore Sanfilippo2017-08-031-0/+1
|\ \ \ \ | | | | | | | | | | Add missing fclose()
| * | | | Add missing fclose()jybaek2017-08-031-0/+1
|/ / / /
* | | | Merge pull request #3935 from itamarhaber/module-cmdstatsSalvatore Sanfilippo2017-08-021-10/+17
|\ \ \ \ | | | | | | | | | | Changes command stats iteration to being dict-based
| * | | | Changes command stats iteration to being dict-basedItamar Haber2017-04-131-10/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the addition of modules, looping over the redisCommandTable misses any added commands. By moving to dictionary iteration this is resolved.
* | | | | Add MEMORY DOCTOR to MEMORY HELP.antirez2017-07-281-1/+3
| |_|/ / |/| | |
* | | | Merge pull request #1934 from badboy/install-script-1922Salvatore Sanfilippo2017-07-241-6/+6
|\ \ \ \ | | | | | | | | | | Don't use extended Regexp Syntax
| * | | | Don't use extended Regexp SyntaxJan-Erik Rediger2014-08-131-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's not POSIX (BSD systems have -E instead) and we don't actually need it. Closes #1922
* | | | | Merge pull request #2259 from badboy/fix-2258Salvatore Sanfilippo2017-07-241-2/+3
|\ \ \ \ \ | | | | | | | | | | | | Check that the whole first argument is a number
| * | | | | Check that the whole first argument is a numberJan-Erik Rediger2015-01-071-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | Fixes #2258
* | | | | | Merge pull request #4124 from lamby/proceding-proceeding-typoSalvatore Sanfilippo2017-07-241-1/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | Correct proceding -> proceeding typo.
| * | | | | | Correct proceding -> proceeding typo.Chris Lamb2017-07-141-1/+1
| | | | | | |
* | | | | | | Merge pull request #4125 from trevor211/fixAutoAofRewirteMinSizeSalvatore Sanfilippo2017-07-241-2/+2
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | fix rewrite config: auto-aof-rewrite-min-size
| * | | | | | | fix rewrite config: auto-aof-rewrite-min-sizeWuYunlong2017-07-151-2/+2
| | | | | | | |
* | | | | | | | Merge pull request #1998 from grobe0ba/unstableSalvatore Sanfilippo2017-07-241-1/+1
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Fix missing '-' in redis-benchmark help output (Issue #1996)
| * | | | | | | | Fixed issue #1996 (Missing '-' in help message for redis-benchmark)Byron Grobe2014-09-111-1/+1
| | | | | | | | |
* | | | | | | | | Merge pull request #4128 from leonchen83/unstableSalvatore Sanfilippo2017-07-241-3/+5
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | fix mismatch argument and return wrong value of clusterDelNodeSlots
| * | | | | | | | | fix return wrong value of clusterDelNodeSlotsLeon Chen2017-07-201-2/+4
| | | | | | | | | |
| * | | | | | | | | fix mismatch argumentLeon Chen2017-07-181-1/+1
| | |_|/ / / / / / | |/| | | | | | |
* | | | | | | | | Merge pull request #4154 from liangsijian/unstableSalvatore Sanfilippo2017-07-241-0/+1
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Fix lua ldb command log
| * | | | | | | | | Fix lua ldb command logliangsijian2017-07-241-0/+1
|/ / / / / / / / /