summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #5339 from vrana/master-replicamaster-replicaSalvatore Sanfilippo2018-09-112-5/+5
|\ | | | | Slave removal: capitalize Replica
| * Slave removal: capitalize ReplicaJakub Vrana2018-09-112-5/+5
|/
* Slave removal: remove slave from integration tests descriptions.antirez2018-09-118-36/+36
|
* Slave removal: remove slave from top-level tests descriptions.antirez2018-09-113-12/+12
|
* Slave removal: remove slave from object.c.antirez2018-09-111-1/+1
|
* Slave removal: remove slave from the README.antirez2018-09-111-7/+7
|
* Slave removal: server.c logs fixed.antirez2018-09-111-5/+5
|
* Slave removal: remove slave from sentinel.conf when possible.antirez2018-09-101-18/+18
| | | | | | | | All the occurrences translated, but the ones referring to SLAVEOF must be intact because that describe the actual Sentinel -> Redis protocol. In theory we could send REPLICAOF to Redis instances, but actually this would prevent Sentinel to be compatible with older Redis instances.
* Slave removal: replace very few things in Sentinel.antirez2018-09-101-8/+12
| | | | | | | | SENTINEL REPLICAS was added as an alias, in the configuration rewriting now it uses known-replica, however all the rest is basically at API level of logged events and messages having to do with the protocol, so there is very little to do here compared to the Redis core itself, to preserve compatibility.
* Slave removal: scripting.c logs and other stuff fixed.antirez2018-09-101-2/+6
|
* Slave removal: replication.c logs fixed.antirez2018-09-101-35/+35
|
* Slave removal: networking.c logs fixed.antirez2018-09-101-5/+5
|
* Slave removal: blocked.c logs fixed.antirez2018-09-101-1/+1
|
* Slave removal: Make obvious in redis.conf what a replica is.antirez2018-09-101-0/+5
|
* Slave removal: slave mode -> replica mode text in redis-cli.antirez2018-09-101-1/+1
|
* Slave removal: fix typo of replicaof.antirez2018-09-101-1/+1
|
* Slave removal: slave -> replica in redis.conf and output buffer option.antirez2018-09-103-129/+132
|
* Slave removal: config.c converted + config rewriting hacks.antirez2018-09-101-38/+117
| | | | | | Aliases added for all the commands mentioning slave. Moreover CONFIG REWRITE will use the new names, and will be able to reuse the old lines mentioning the old options.
* Slave removal: Convert cluster.c log messages and command names.antirez2018-09-101-11/+12
|
* Slave removal: redis-cli --slave -> --replica.antirez2018-09-101-1/+3
| | | | | --slave alias remains but is undocumented, just for backward compatibiltiy.
* Slave removal: SLAVEOF -> REPLICAOF. SLAVEOF is now an alias.antirez2018-09-103-3/+4
|
* Merge pull request #5307 from mesbahamin/use_geohash_defines_in_checkSalvatore Sanfilippo2018-09-071-2/+2
|\ | | | | Use geohash limit defines in constraint check
| * Use geohash limit defines in constraint checkAmin Mesbah2018-09-021-2/+2
| | | | | | | | | | | | | | Slight robustness improvement, especially if the limit values are changed, as was suggested in antires/redis#4291 [1]. [1] https://github.com/antirez/redis/pull/4291
* | Merge pull request #5239 from jeffreylovitz/cli-help-fixSalvatore Sanfilippo2018-09-071-1/+1
|\ \ | | | | | | CLI Help text loop verifies arg count
| * | CLI Help text loop verifies arg countJeffrey Lovitz2018-08-121-1/+1
| | |
* | | Merge pull request #5322 from youjiali1995/fix-sentinel-randomizeSalvatore Sanfilippo2018-09-071-3/+1
|\ \ \ | | | | | | | | sentinel: fix randomized sentinelTimer.
| * | | sentinel: fix randomized sentinelTimer.youjiali19952018-09-051-3/+1
| | | |
* | | | Merge pull request #5324 from youjiali1995/fix-bioSalvatore Sanfilippo2018-09-071-3/+3
|\ \ \ \ | | | | | | | | | | bio: fix bioWaitStepOfType.
| * | | | bio: fix bioWaitStepOfType.youjiali19952018-09-051-3/+3
| |/ / /
* | | | Merge pull request #5331 from Weiliang-Li/patch-redis-cliSalvatore Sanfilippo2018-09-061-1/+1
|\ \ \ \ | | | | | | | | | | fix usage typo in redis-cli
| * | | | fix usage typo in redis-cliWeiliang Li2018-09-061-1/+1
|/ / / /
* | | | Fix scripting tests now that we default to commands repl.antirez2018-09-051-1/+8
| | | |
* | | | Use commands (effects) replication by default in scripts.antirez2018-09-053-1/+8
| | | | | | | | | | | | | | | | See issue #5250 and issue #5292 for more info.
* | | | Safer script stop condition on OOM.antirez2018-09-051-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Here the idea is that we do not want freeMemoryIfNeeded() to propagate a DEL command before the script and change what happens in the script execution once it reaches the slave. For example see this potential issue (in the words of @soloestoy): On master, we run the following script: if redis.call('get','key') then redis.call('set','xxx','yyy') end redis.call('set','c','d') Then when redis attempts to execute redis.call('set','xxx','yyy'), we call freeMemoryIfNeeded(), and the key may get deleted, and because redis.call('set','xxx','yyy') has already been executed on master, this script will be replicated to slave. But the slave received "DEL key" before the script, and will ignore maxmemory, so after that master has xxx and c, slave has only one key c. Note that this patch (and other related work) was authored collaboratively in issue #5250 with the help of @soloestoy and @oranagra. Related to issue #5250.
* | | | Propagate read-only scripts as SCRIPT LOAD.antirez2018-09-051-3/+16
| | | | | | | | | | | | | | | | | | | | See issue #5250 and the new comments added to the code in this commit for details.
* | | | Don't perform eviction when re-entering the event loop.antirez2018-09-051-2/+7
|/ / / | | | | | | | | | Related to #5250.
* | | Clarify why remaining may be zero in readQueryFromClient().antirez2018-09-041-0/+2
| | | | | | | | | | | | See #5304.
* | | Merge branch 'unstable' of github.com:/antirez/redis into unstableantirez2018-09-042-2/+2
|\ \ \
| * \ \ Merge pull request #5304 from soloestoy/fix-unexpected-readlenSalvatore Sanfilippo2018-09-041-1/+1
| |\ \ \ | | | | | | | | | | networking: fix unexpected negative or zero readlen
| | * | | networking: fix unexpected negative or zero readlenzhaozhao.zz2018-08-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To avoid copying buffers to create a large Redis Object which exceeding PROTO_IOBUF_LEN 32KB, we just read the remaining data we need, which may less than PROTO_IOBUF_LEN. But the remaining len may be zero, if the bulklen+2 equals sdslen(c->querybuf), in client pause context. For example: Time1: python >>> import os, socket >>> server="127.0.0.1" >>> port=6379 >>> data1="*3\r\n$3\r\nset\r\n$1\r\na\r\n$33000\r\n" >>> data2="".join("x" for _ in range(33000)) + "\r\n" >>> data3="\n\n" >>> s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) >>> s.settimeout(10) >>> s.connect((server, port)) >>> s.send(data1) 28 Time2: redis-cli client pause 10000 Time3: >>> s.send(data2) 33002 >>> s.send(data3) 2 >>> s.send(data3) Traceback (most recent call last): File "<stdin>", line 1, in <module> socket.error: [Errno 104] Connection reset by peer To fix that, we should check if remaining is greater than zero.
| * | | | Merge pull request #5321 from maya-rv/patch-1Salvatore Sanfilippo2018-09-041-1/+1
| |\ \ \ \ | | | | | | | | | | | | Fix typo
| | * | | | Fix typomaya-rv2018-09-041-1/+1
| | | | | |
* | | | | | #5299 Fix blocking XREAD for streams that ran drySascha Roland2018-09-041-2/+2
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The conclusion, that a xread request can be answered syncronously in case that the stream's last_id is larger than the passed last-received-id parameter, assumes, that there must be entries present, which could be returned immediately. This assumption fails for empty streams that actually contained some entries which got removed by xdel, ... . As result, the client is answered synchronously with an empty result, instead of blocking for new entries to arrive. An additional check for a non-empty stream is required.
* | | | | Merge pull request #5315 from soloestoy/optimize-parsing-large-bulkSalvatore Sanfilippo2018-09-041-10/+13
|\ \ \ \ \ | |/ / / / |/| | | | networking: optimize parsing large bulk greater than 32k
| * | | | networking: optimize parsing large bulk greater than 32kzhaozhao.zz2018-09-041-10/+13
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we are going to read a large object from network try to make it likely that it will start at c->querybuf boundary so that we can optimize object creation avoiding a large copy of data. But only when the data we have not parsed is less than or equal to ll+2. If the data length is greater than ll+2, trimming querybuf is just a waste of time, because at this time the querybuf contains not only our bulk. It's easy to reproduce the that: Time1: call `client pause 10000` on slave. Time2: redis-benchmark -t set -r 10000 -d 33000 -n 10000. Then slave hung after 10 seconds.
* | | | Unblocked clients API refactoring. See #4418.antirez2018-09-034-15/+33
| | | |
* | | | Merge pull request #4418 from soloestoy/fix-multiple-unblockSalvatore Sanfilippo2018-09-032-4/+4
|\ \ \ \ | | | | | | | | | | fix multiple unblock for clientsArePaused()
| * | | | if master is already unblocked, do not unblock it twicezhaozhao.zz2018-09-031-1/+1
| | | | |
| * | | | fix multiple unblock for clientsArePaused()zhaozhao.zz2018-09-031-3/+3
| |/ / /
* | | | Make pending buffer processing safe for CLIENT_MASTER client.antirez2018-09-033-13/+22
|/ / / | | | | | | | | | Related to #5305.