7580 Commits

Author SHA1 Message Date
zhaozhao.zz
000b055b76 Streams: checkType before XGROUP CREATE
Fix issue #5785, in case create group on a key is not stream.
2019-03-13 12:35:10 +01:00
antirez
9b2a0d5497 Fix BZPOP arity, backport from fix in cd2743c. 2019-03-13 12:28:36 +01:00
chendianqiang
134b258252 optimize cluster failover 2019-03-13 12:23:27 +01:00
Steve Webster
1293e2a565 Only increment delivery count if JUSTID option is omitted 2019-03-13 11:57:20 +01:00
Steve Webster
3cc4f469bc Increment delivery counter on XCLAIM unless RETRYCOUNT specified
The XCLAIM docs state the XCLAIM increments the delivery counter for
messages. This PR makes the code match the documentation - which seems
like the desired behaviour - whilst still allowing RETRYCOUNT to be
specified manually.

My understanding of the way streamPropagateXCLAIM() works is that this
change will safely propagate to replicas since retry count is pulled
directly from the streamNACK struct.

Fixes #5194
2019-03-13 11:57:15 +01:00
antirez
f4edd2b924 Merge branch '5.0' of github.com:/antirez/redis into 5.0 2019-03-13 11:56:42 +01:00
swilly22
cedcc54e4a document additional flag of RM_GetContextFlags 2019-03-13 11:53:39 +01:00
swilly22
26e98da20b Extend REDISMODULE_CTX_FLAGS to indicate if command was sent by master 2019-03-13 11:53:31 +01:00
Salvatore Sanfilippo
0e91093902
Merge pull request #5879 from meierfra-ergon/redis-cli-assume-yes
added 'assume-yes' option to redis-cli
2019-03-12 17:25:57 +01:00
antirez
67452e9136 Make comment in #5911 stay inside 80 cols. 2019-03-10 09:52:13 +01:00
John Sully
30f666ef4a Replicas aren't allowed to run the replicaof command 2019-03-10 09:52:13 +01:00
Frank Meier
bc6c1c40db extend use of cluster-yes option to other confimation questions 2019-03-04 09:22:53 +01:00
antirez
76419d8d5b Merge branch '5.0' of github.com:/antirez/redis into 5.0 2019-03-01 17:46:21 +01:00
Oran Agra
72ba60699d redis-cli add support for --memkeys, fix --bigkeys for module types
* bigkeys used to fail on databases with module type keys
* new code adds more types when it discovers them, but has no way to know element count in modules types yet
* bigkeys was missing XLEN command for streams
* adding --memkeys and --memkeys-samples to make use of the MEMORY USAGE command

see #5167, #5175
2019-03-01 17:31:08 +01:00
chendianqiang
2ca2175362 fix replicationid will not change for server.masterhost==NULL in cluster mode when restart slave 2019-03-01 17:30:32 +01:00
Salvatore Sanfilippo
bd7ddd79dd
Merge pull request #5870 from fengweiyuan/5.0
fix corrupt_rdb.c bug.Let the name of input rdb file name be valid.
2019-03-01 16:57:13 +01:00
varianfeng
d13bc1433e fix corrupt_rdb.c bug.Let the name of input rdb file name be valid. 2019-02-26 10:33:53 +08:00
artix
44c5bce0f4 Cluster Manager: fix replica assigment anti-affinity (create)
Fix issue #5849
2019-02-22 11:18:13 +01:00
artix
f066e52659 Cluster Manager: remove unused code elements 2019-01-25 11:47:59 +01:00
Zhicheng Wei
232149662c fix clusterManagerGetAntiAffinityScore double free otypes 2019-01-25 11:47:01 +01:00
antirez
80bccd7195 Remove debugging printf from replication.tcl test. 2018-12-21 11:42:00 +01:00
antirez
b4867130f4 Redis 5.0.3 5.0.3 2018-12-12 13:25:58 +01:00
antirez
2c6ee0f9b3 freeMemoryIfNeeded() small refactoring.
Related to issue #5686 and PR #5689.
2018-12-12 11:53:15 +01:00
zhaozhao.zz
107e93e75a evict: don't care about mem if loading
When loading data, we call processEventsWhileBlocked
to process events and execute commands.
But if we are loading AOF it's dangerous, because
processCommand would call freeMemoryIfNeeded to evict,
and that will break data consistency, see issue #5686.
2018-12-12 11:53:15 +01:00
antirez
9edb893c7d Crashing is too much in addReplyErrorLength().
See #5663.
2018-12-12 11:53:15 +01:00
hdmg
c55254a5f4 fix comments fault discription 2018-12-11 18:01:36 +01:00
lsytj0413
dfd250132d fix a typo: craeted -> created 2018-12-11 18:01:30 +01:00
antirez
392a2566b6 stringmatchlen() fuzz test added.
Verified to be able to trigger at least #5632. Does not report other
issues.
2018-12-11 17:59:16 +01:00
antirez
7602f69530 Fix stringmatchlen() read past buffer bug.
See #5632.
2018-12-11 17:59:16 +01:00
zhaozhao.zz
c4f3585e1f multi: ignore multiState's cmd_flags when loading AOF 2018-12-11 17:59:16 +01:00
antirez
d037e98711 Reject EXEC containing write commands against RO replica.
Thanks to @soloestoy for discovering this issue in #5667.
This is an alternative fix in order to avoid both cycling the clients
and also disconnecting clients just having valid read-only transactions
pending.
2018-12-11 17:59:16 +01:00
artix
e00ab32454 Cluster Manager:
- Multiple owners checking in 'fix'/'check' commands is now
  optional (using --cluster-search-multiple-owners).
- Updated help.
2018-12-11 17:59:16 +01:00
artix
94f64de35c Cluster Manager:
- FixOpenSlot now correctly updates in-memory cluster configuration.
    - Improved output messages.
2018-12-11 17:59:16 +01:00
artix
752d636fa6 Cluster Manager: 'fix' command now handles open slots with migrating state
in one node and importing state in multiple nodes.
2018-12-11 17:59:16 +01:00
artix
552091f990 Cluster Manager: setting new slot owner is now handled atomically
in 'fix' command.
2018-12-11 17:59:16 +01:00
artix
2280f4f7c4 Cluster Manager: code cleanup. 2018-12-11 17:59:16 +01:00
artix
e084b8ccbf Cluster Manager: check/fix commands now handle multiple owners even if
all slots are covered and not open.
2018-12-11 17:59:16 +01:00
zhaozhao.zz
fa726e2af5 remove useless tryObjectEncoding in debug assert 2018-12-11 17:59:16 +01:00
Oran Agra
40244b10f0 fix #5580, display fragmentation and rss overhead bytes as signed
these metrics become negative when RSS is smaller than the used_memory.
This can easily happen when the program allocated a lot of memory and haven't
written to it yet, in which case the kernel doesn't allocate any pages to the process
2018-12-11 17:58:50 +01:00
zhaozhao.zz
beab31512e networking: current_client should not be NULL when trim qb_pos 2018-12-11 17:58:50 +01:00
antirez
07ccb642b7 Remove no longer relevant comment in processCommand(). 2018-12-11 17:58:50 +01:00
antirez
60fdaf072d DEBUG DIGEST-VALUE implemented. 2018-12-11 17:58:50 +01:00
antirez
48b31b0dce DEBUG DIGEST refactoring: extract function to digest a value. 2018-12-11 17:58:50 +01:00
yura
ef3ff40206 redis-cli reshard/rebalance: ability to force replacement on existing keys 2018-12-11 17:58:50 +01:00
Thomas Orozco
ee223fb8c3 cli: pass auth through REDISCLI_AUTH
This adds support for passing a password through a REDISCLI_AUTH
environment variable (which is safer than the CLI), which might often be
safer than passing it through a CLI argument.

Passing a password this way does not trigger the warning about passing a
password through CLI arguments, and CLI arguments take precedence over
it.
2018-12-11 17:58:50 +01:00
yongman
41295e5595 Fix cluster call reply format readable 2018-12-11 17:58:50 +01:00
Oran Agra
0ed3970f2c fix small test suite race conditions 2018-12-11 17:58:50 +01:00
zhaozhao.zz
605dddbbc0 MEMORY command: make USAGE more accurate
In MEMORY USAGE command, we count the key argv[2] into usage,
but the argument in command may contains free spaces because of
sdsMakeRoomFor. But the key in db never contains free spaces
because we use sdsdup when dbAdd, so using the real key to
count the usage is more accurate.
2018-12-11 17:58:19 +01:00
yongman
1f43bf29a3 Fix choose a random master node for slot assignment 2018-12-11 17:58:19 +01:00
Weiliang Li
69f0c6788f fix comment typo in util.c
fix comment typo in util.c
2018-12-11 17:58:19 +01:00