antirez
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
Andrey Bugaevskiy
8b609c9986
Move child termination to readSyncBulkPayload
2018-11-05 17:12:37 +01:00
Andrey Bugaevskiy
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
antirez
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
David Carlier
427e440a58
needs it for the global
2018-11-05 17:12:37 +01:00
David Carlier
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
zhaozhao.zz
4bf9efe20f
MULTI: OOM err if cannot free enough memory in MULTI/EXEC context
2018-11-05 17:12:37 +01:00
antirez
4fbd7a39f8
Add command fingerprint comment for XSETID.
2018-11-05 17:12:37 +01:00
Itamar Haber
2480db53f1
Plugs a potential underflow
2018-11-05 17:12:37 +01:00
Itamar Haber
e5e4d2ef08
Corrects inline documentation of syntax
2018-11-05 17:12:37 +01:00
zhaozhao.zz
713800d20a
if we read a expired key, misses++
2018-11-05 17:12:37 +01:00
antirez
e79ee263cf
Fix XRANGE COUNT option for value of 0.
2018-11-05 17:12:37 +01:00
antirez
505cc70ff8
Fix typo in streamReplyWithRange() top comment.
2018-11-05 17:12:37 +01:00
Damien Tournoud
3c36561d27
Overhead is the allocated size of the AOF buffer, not its length
2018-11-05 17:12:37 +01:00
antirez
3761582ffc
Simplify part of the #5470 patch.
2018-11-05 17:12:37 +01:00
zhaozhao.zz
edc47a3ad2
do not delete expired keys in KEYS command
2018-11-05 17:12:37 +01:00
antirez
9872af6d52
Use guide comments to make changes in #5462 more obvious.
2018-10-22 17:45:39 +02:00
youjiali1995
3f399c3bff
migrate: fix mismatch of RESTORE reply when some keys have expired.
2018-10-22 17:45:39 +02:00
hujie
eaaff6211b
fix typo in config.c
2018-10-22 17:45:39 +02:00
hujiecs
43ebb7ee01
several typos fixed, optimize MSETNX to avoid unnecessary loop
2018-10-22 17:45:31 +02:00
antirez
de8fdaacfc
Remove useless complexity from MSET implementation.
2018-10-22 17:44:26 +02:00
antirez
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
antirez
83a6e81db3
Get rid of the word slave in the release note of Redis 5.
2018-10-17 18:11:49 +02:00
antirez
882ca6962f
Redis 5.0.0.
5.0.0
2018-10-17 17:31:39 +02:00
antirez
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
antirez
bcc0916d08
Fix conditional in XGROUP.
2018-10-17 13:00:55 +02:00
antirez
1b2f23f3c4
Update help.h for redis-cli.
2018-10-17 12:57:15 +02:00
antirez
de0ae56c84
Tests for XGROUP CREATE MKSTREAM.
2018-10-17 12:12:04 +02:00
antirez
56c3dfa195
Fix XGROUP CREATE MKSTREAM handling of .
2018-10-17 12:11:48 +02:00
antirez
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
zhaozhao.zz
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
antirez
4e4099b95d
XGROUP CREATE: MKSTREAM option for automatic stream creation.
2018-10-17 11:27:09 +02:00
zhaozhao.zz
6dd4d864a9
Streams: Tests modified XSTREAM -> XSETID
2018-10-17 11:02:34 +02:00
zhaozhao.zz
3aff0e8cb5
Streams: rewrite empty streams with certain lastid
2018-10-17 11:02:34 +02:00
antirez
880b563e2d
Tests modified to use XADD MAXLEN 0 + XSETID.
...
See #5426 .
2018-10-17 11:02:34 +02:00
antirez
83c8783598
Streams: rewrite empty streams with XADD MAXLEN 0. Use XSETID.
...
Related to #5426 .
2018-10-17 11:02:34 +02:00
antirez
fd22e3acae
XSETID: accept IDs based on last entry.
...
Related to #5426 .
2018-10-17 11:02:34 +02:00
antirez
dfab3cba2a
Streams: XSTREAM SETID -> XSETID.
...
Keep vanilla stream commands at toplevel, see #5426 .
2018-10-17 11:02:34 +02:00
zhaozhao.zz
a3fb28edce
Streams: rewrite id in XSTREAM CREATE *
2018-10-17 11:02:34 +02:00
zhaozhao.zz
f4b4db1387
Streams: add tests for aof rewrite
2018-10-17 11:02:34 +02:00
zhaozhao.zz
d22f1ef032
Stream & AOF: rewrite stream in correct way
2018-10-17 11:02:34 +02:00
zhaozhao.zz
6455274d1c
Streams: add tests for XSTREAM command
2018-10-17 11:02:34 +02:00
zhaozhao.zz
0edbe953ea
Streams: add a new command XTREAM
...
XSTREAM CREATE <key> <id or *> -- Create a new empty stream.
XSTREAM SETID <key> <id or $> -- Set the current stream ID.
2018-10-17 11:02:34 +02:00
Hamid Alaei
9714bba266
fix timer context selected database
2018-10-15 13:05:42 +02:00
antirez
eb53f15a3e
Make comment about nack->consumer test for minidle more obvious.
...
Related to #5437 .
2018-10-15 13:05:35 +02:00
antirez
a77f836e0d
Streams: use propagate_last_id itself as streamPropagateGroupID trigger.
...
Avoid storing the dirty value. See #5437 .
2018-10-15 13:05:35 +02:00
antirez
0f0610eb01
Streams: better naming: lastid_updated -> propagate_last_id.
...
See #5437 but also I updated a previous usage of the same var name.
2018-10-15 13:05:35 +02:00
zhaozhao.zz
a745e4234d
Streams: panic if streamID invalid after check, should not be possible.
2018-10-15 13:05:35 +02:00
zhaozhao.zz
9974be13a4
Streams: propagate lastid in XCLAIM when it has effect
2018-10-15 13:05:35 +02:00
zhaozhao.zz
69a628d0f0
Streams: XCLAIM ignore minidle if NACK is created by FORCE
...
Because the NACK->consumer is NULL, if idletime < minidle
the NACK does not belong to any consumer, then redis will crash
in XPENDING.
2018-10-15 13:05:35 +02:00