Commit Graph

7506 Commits

Author SHA1 Message Date
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
88805cbb3e fix short period of server.hz being uninitialized
server.hz was uninitialized between initServerConfig and initServer.
this can lead to someone (e.g. queued modules) doing createObject,
and accessing an uninitialized variable, that can potentially be 0,
and lead to a crash.
2018-11-07 13:05:49 +01:00
6b402733e1 Adds HELP to LATENCY
Signed-off-by: Itamar Haber <itamar@redislabs.com>
2018-11-07 13:05:49 +01:00
1c637de98c fix malloc in clusterManagerComputeReshardTable 2018-11-07 13:05:49 +01:00
90b52fde57 Cluster Manager: removed unused var. 2018-11-07 13:05:49 +01:00
89cbb5df06 Cluster Manager: further improvements to "fix":
- clusterManagerFixOpenSlot: ensure that the
  slot is unassigned before ADDSLOTS
- clusterManagerFixSlotsCoverage: after cold
  migration, the slot configuration
  is now updated on all the nodes.
2018-11-07 13:05:49 +01:00
175515c944 Cluster Manager: fixed string parsing issue in clusterManagerGetConfigSignature 2018-11-07 13:05:29 +01:00
3997dd6eaa Cluster Manager: better fix subcommand. 2018-11-07 13:05:29 +01:00
bd80291c36 Cluster Manager: fixed typos in comments. 2018-11-07 13:05:29 +01:00
4369cbce08 Cluster Manager: fixed 'DELSLOT' subcommand typo. 2018-11-07 13:05:29 +01:00
1ed821e28d Fix XCLAIM missing entry bug.
This bug had a double effect:

1. Sometimes entries may not be emitted, producing broken protocol where
the array length was greater than the emitted entires, blocking the
client waiting for more data.

2. Some other time the right entry was claimed, but a wrong entry was
returned to the client.

This fix should correct both the instances.
2018-11-05 17:12:37 +01:00
b49bcd01d0 Use typedef'd mstime_t instead of time_t
This fixes an overflow on 32-bit systems.
2018-11-05 17:12:37 +01:00
09d1849ed5 Improve streamReplyWithRange() top comment. 2018-11-05 17:12:37 +01:00
bdf6306f29 Add support for Sentinel authentication.
So far it was not possible to setup Sentinel with authentication
enabled. This commit introduces this feature: every Sentinel will try to
authenticate with other sentinels using the same password it is
configured to accept clients with.

So for instance if a Sentinel has a "requirepass" configuration
statemnet set to "foo", it will use the "foo" password to authenticate
with every other Sentinel it connects to. So basically to add the
"requirepass" to all the Sentinels configurations is enough in order to
make sure that:

1) Clients will require the password to access the Sentinels instances.
2) Each Sentinel will use the same password to connect and authenticate
   with every other Sentinel in the group.

Related to #3279 and #3329.
2018-11-05 17:12:37 +01:00
50222af5f4 Disable protected mode in Sentinel mode.
Sentinel must be exposed, so protected mode is just an issue for users
in case Redis was started in Sentinel mode.

Related to #3279 and #3329.
2018-11-05 17:12:37 +01:00
643ee6e38c When replica kills a pending RDB save during SYNC, log it.
This logs what happens in the context of the fix in PR #5367.
2018-11-05 17:12:37 +01:00
8b609c9986 Move child termination to readSyncBulkPayload 2018-11-05 17:12:37 +01:00
2710260594 Prevent RDB autosave from overwriting full resync results
During the full database resync we may still have unsaved changes
on the receiving side. This causes a race condition between
synced data rename/load and the rename of rdbSave tempfile.
2018-11-05 17:12:37 +01:00
a677923d7c asyncCloseClientOnOutputBufferLimitReached(): don't free fake clients.
Fake clients are used in special situations and are not linked to the
normal clients list, freeing them will always result in Redis crashing
in one way or the other.

It's not common to send replies to fake clients, but we have one usage
in the modules API. When a client is blocked, we associate to the
blocked client object (that is safe to manipulate in a thread), a fake
client that accumulates replies. So because of this bug there was
the problem described in issue #5443.

The fix was verified to work with the provided example module. To write
a regression is very hard and unlikely to be triggered in the future.
2018-11-05 17:12:37 +01:00
427e440a58 needs it for the global 2018-11-05 17:12:37 +01:00
28f9ca4e1d Fix non Linux build.
timezone global is a linux-ism whereas it is a function under BSD.
Here a helper to get the timezone value in a more portable manner.
2018-11-05 17:12:37 +01:00
4bf9efe20f MULTI: OOM err if cannot free enough memory in MULTI/EXEC context 2018-11-05 17:12:37 +01:00
4fbd7a39f8 Add command fingerprint comment for XSETID. 2018-11-05 17:12:37 +01:00
2480db53f1 Plugs a potential underflow 2018-11-05 17:12:37 +01:00
e5e4d2ef08 Corrects inline documentation of syntax 2018-11-05 17:12:37 +01:00
713800d20a if we read a expired key, misses++ 2018-11-05 17:12:37 +01:00
e79ee263cf Fix XRANGE COUNT option for value of 0. 2018-11-05 17:12:37 +01:00
505cc70ff8 Fix typo in streamReplyWithRange() top comment. 2018-11-05 17:12:37 +01:00
3c36561d27 Overhead is the allocated size of the AOF buffer, not its length 2018-11-05 17:12:37 +01:00
3761582ffc Simplify part of the #5470 patch. 2018-11-05 17:12:37 +01:00
edc47a3ad2 do not delete expired keys in KEYS command 2018-11-05 17:12:37 +01:00
9872af6d52 Use guide comments to make changes in #5462 more obvious. 2018-10-22 17:45:39 +02:00
3f399c3bff migrate: fix mismatch of RESTORE reply when some keys have expired. 2018-10-22 17:45:39 +02:00
eaaff6211b fix typo in config.c 2018-10-22 17:45:39 +02:00
43ebb7ee01 several typos fixed, optimize MSETNX to avoid unnecessary loop 2018-10-22 17:45:31 +02:00
de8fdaacfc Remove useless complexity from MSET implementation. 2018-10-22 17:44:26 +02:00
dc8f111251 Fix again stack generation on the Raspberry Pi.
The fix was removed by c8ca71d40 attempting to fix the stack generation
on ARM64, without testing if it would still work on ARM32.
Now it should work both sides.
2018-10-19 10:40:42 +02:00
83a6e81db3 Get rid of the word slave in the release note of Redis 5. 2018-10-17 18:11:49 +02:00
882ca6962f Redis 5.0.0. 5.0.0 2018-10-17 17:31:39 +02:00
1eb0994ecc Streams: use bulk replies instead of status replies.
They play better with Lua scripting, otherwise Lua will see status
replies as "ok" = "string" which is very odd, and actually as @oranagra
reasoned in issue #5456 in the rest of the Redis code base there was no
such concern as saving a few bytes when the protocol is emitted.
2018-10-17 17:20:05 +02:00
bcc0916d08 Fix conditional in XGROUP. 2018-10-17 13:00:55 +02:00
1b2f23f3c4 Update help.h for redis-cli. 2018-10-17 12:57:15 +02:00
de0ae56c84 Tests for XGROUP CREATE MKSTREAM. 2018-10-17 12:12:04 +02:00
56c3dfa195 Fix XGROUP CREATE MKSTREAM handling of . 2018-10-17 12:11:48 +02:00
2687f2283c Process MKSTREAM option of XGROUP CREATE at a later time.
This avoids issues with having to replicate a command that produced
errors.
2018-10-17 12:11:48 +02:00
cfbaf8f1f3 Scripting & Streams: some commands need right flags
xadd with id * generates random stream id

xadd & xtrim with approximate maxlen count may
trim stream randomly

xinfo may get random radix-tree-keys/nodes

xpending may get random idletime

xclaim: master and slave may have different
idletime in stream
2018-10-17 12:11:48 +02:00
4e4099b95d XGROUP CREATE: MKSTREAM option for automatic stream creation. 2018-10-17 11:27:09 +02:00
6dd4d864a9 Streams: Tests modified XSTREAM -> XSETID 2018-10-17 11:02:34 +02:00