Commit Graph

7553 Commits

Author SHA1 Message Date
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
7602f69530 Fix stringmatchlen() read past buffer bug.
See #5632.
2018-12-11 17:59:16 +01:00
c4f3585e1f multi: ignore multiState's cmd_flags when loading AOF 2018-12-11 17:59:16 +01:00
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
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
94f64de35c Cluster Manager:
- FixOpenSlot now correctly updates in-memory cluster configuration.
    - Improved output messages.
2018-12-11 17:59:16 +01:00
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
552091f990 Cluster Manager: setting new slot owner is now handled atomically
in 'fix' command.
2018-12-11 17:59:16 +01:00
2280f4f7c4 Cluster Manager: code cleanup. 2018-12-11 17:59:16 +01:00
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
fa726e2af5 remove useless tryObjectEncoding in debug assert 2018-12-11 17:59:16 +01:00
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
beab31512e networking: current_client should not be NULL when trim qb_pos 2018-12-11 17:58:50 +01:00
07ccb642b7 Remove no longer relevant comment in processCommand(). 2018-12-11 17:58:50 +01:00
60fdaf072d DEBUG DIGEST-VALUE implemented. 2018-12-11 17:58:50 +01:00
48b31b0dce DEBUG DIGEST refactoring: extract function to digest a value. 2018-12-11 17:58:50 +01:00
ef3ff40206 redis-cli reshard/rebalance: ability to force replacement on existing keys 2018-12-11 17:58:50 +01:00
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
41295e5595 Fix cluster call reply format readable 2018-12-11 17:58:50 +01:00
0ed3970f2c fix small test suite race conditions 2018-12-11 17:58:50 +01:00
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
1f43bf29a3 Fix choose a random master node for slot assignment 2018-12-11 17:58:19 +01:00
69f0c6788f fix comment typo in util.c
fix comment typo in util.c
2018-12-11 17:58:19 +01:00
bc53a3abb9 Clarify the "Creating Server TCP listening socket" error.
This really helps spot it in the logs, otherwise it does not look like a
warning/error. For example:

  Creating Server TCP listening socket ::1:6379: bind: Cannot assign requested address

... is not nearly as clear as:

  Could not create server TCP listening listening socket ::1:6379: bind: Cannot assign requested address
2018-12-11 17:58:19 +01:00
fefe546068 Don't treat unsupported protocols as fatal errors
If we encounter an unsupported protocol in the "bind" list, don't
ipso-facto consider it a fatal error. We continue to abort startup if
there are no listening sockets at all.

This ensures that the lack of IPv6 support does not prevent Redis from
starting on Debian where we try to bind to the ::1 interface by default
(via "bind 127.0.0.1 ::1"). A machine with IPv6 disabled (such as some
container systems) would simply fail to start Redis after the initiall
call to apt(8).

This is similar to the case for where "bind" is not specified:

  https://github.com/antirez/redis/issues/3894

... and was based on the corresponding PR:

  https://github.com/antirez/redis/pull/4108

... but also adds EADDRNOTAVAIL to the list of errors to catch which I
believe is missing from there.

This issue was raised in Debian as both <https://bugs.debian.org/900284>
& <https://bugs.debian.org/914354>.
2018-12-11 17:58:19 +01:00
a8862972b6 OpenBSD support.
Special treatment here as backtrace support is optional,
cannot be found via pkg-config and similar neither.
2018-12-11 17:58:19 +01:00
5e86daf947 Backtrace/register dump on BSD.
FreeBSD/DragonFlyBSD does have backtrace only it does not
belong to libc.
2018-12-11 17:58:19 +01:00
7c8cf5acdd Don't call sdscmp() with shared.maxstring or shared.minstring 2018-12-11 17:58:19 +01:00
39e9eda377 Add unit test for stream XCLAIM command. 2018-12-11 17:57:54 +01:00
62485232e8 Abort instead of crashing when loading bad stream master key.
See #5612.
2018-12-11 17:57:50 +01:00
a54873092e Fixed a serverPanic when sending an invalid command to a monitor client 2018-12-04 18:10:22 +01:00
1637522f00 Redis 5.0.2. 5.0.2 2018-11-22 11:26:38 +01:00
e8b4291a0f DragonFlyBSD little build fix 2018-11-22 11:21:47 +01:00
8fcfd374d7 skip slave nodes when sending cluster setslot command 2018-11-22 11:21:47 +01:00
d7089ddddc Fix pointer access and memory leak in redis-cli. 2018-11-22 11:21:47 +01:00
17b4cd83f4 Test: regression test for #5570. 2018-11-20 08:32:50 +01:00
45123169bc Stream: fix XREADGROUP history reading of deleted messages.
This commit fixes #5570. It is a similar bug to one fixed a few weeks
ago and is due to the range API to be called with NULL as "end ID"
parameter instead of repeating again the start ID, to be sure that we
selectively issue the entry with a given ID, or we get zero returned
(and we know we should emit a NULL reply).
2018-11-20 08:32:47 +01:00
5ad588f0f4 only FreeBSD change/little warning addressing 2018-11-20 08:32:41 +01:00
11801e1a78 tweak form feedback 2018-11-20 08:32:31 +01:00
c1f13575d7 allow flavors 2018-11-20 08:32:31 +01:00
275a2d49cc Fix clang build.
Some math functions require c11 standard.
2018-11-20 08:32:31 +01:00
44ad514185 Test: regression test for #5577. 2018-11-20 08:32:31 +01:00
c7951f4304 Streams: fix XREADGROUP history reading when CG last_id is low.
This fixes the issue reported in #5570.
This was fixed the hard way, that is, propagating more information to
the lower level API about this being a request to read just the history,
so that the code is simpler and less likely to regress.
2018-11-20 08:32:31 +01:00
a69bc5befe t_stream.c comment resized to 80 cols. 2018-11-20 08:32:31 +01:00
5314099d04 Redis 5 changelog: don't expect Lua replies to be ordered.
Related to #5538.
2018-11-07 17:00:13 +01:00
c595050012 Redis 5.0.1. 5.0.1 2018-11-07 13:23:06 +01:00
c801283fd2 Fix cluster-replica-no-failover option name.
Thanks to @NicolasLM, see issue #5537.
2018-11-07 13:08:05 +01:00
4c4f50e1c1 MEMORY command: make strcasecmp() conditional like the following. 2018-11-07 13:08:02 +01:00
a7b46e0e64 Uppercases subcommands in MEMORY HELP 2018-11-07 13:05:49 +01:00
80e129d93e Standardizes MEMORY HELP subcommand 2018-11-07 13:05:49 +01:00