12229 Commits

Author SHA1 Message Date
Muhammad Zahalqa
d28ef47458 replace memcpy with cctor on objects
Former-commit-id: 52897f8f9a882bcdbd1e8ede6bdf24e7435f5ce8
2020-06-24 23:20:59 -04:00
Muhammad Zahalqa
792bc57fdf unique lock used with cv.wait already owns mutex
Former-commit-id: 8bc70e9840222d11507af30a6db27210b16650a2
2020-06-24 23:18:53 -04:00
Muhammad Zahalqa
d4dfac4b6a Fix bug in condition_variabe.wait usage
consition variable wait should always be called with a locked mutex.
This code break the pre-conditions of using wait.


Former-commit-id: 5b81303f04580010f043e518a109b43971a63054
2020-06-24 23:18:53 -04:00
Muhammad Zahalqa
ca929bb9c1 fixes for robj_sharedptr
1. fix cases where null pointer might be accessed
2. make assignmnet op safe
3. make operator bool explicit (safe bool idiom)
4. make comparison operators symetric

fix robj_sharedptr use in rdb.cpp


Former-commit-id: ede524c0647c0875f1071978f26ff785c8d1183e
2020-06-24 23:18:27 -04:00
Muhammad Zahalqa
98abc0e47e aeCommand objects no need for memset and missing init of some memebers.
Former-commit-id: aeed09c34620e465b57f1d83553d259c4f6d892f
2020-06-24 23:15:29 -04:00
antirez
0cae0900cf help.h updated. 2020-06-12 12:16:24 +02:00
antirez
e0022d8cfe LPOS: tests + crash fix. 2020-06-12 12:08:06 +02:00
antirez
495327c020 LPOS: update to latest proposal.
See https://gist.github.com/antirez/3591c5096bc79cad8b5a992e08304f48
2020-06-12 12:08:06 +02:00
antirez
afb8b3c030 LPOS: implement the final design. 2020-06-12 12:08:06 +02:00
Paul Spooren
31c9cd8604 LRANK: Add command (the command will be renamed LPOS).
The `LRANK` command returns the index (position) of a given element
within a list. Using the `direction` argument it is possible to specify
going from head to tail (acending, 1) or from tail to head (decending,
-1). Only the first found index is returend. The complexity is O(N).

When using lists as a queue it can be of interest at what position a
given element is, for instance to monitor a job processing through a
work queue. This came up within the Python `rq` project which is based
on Redis[0].

[0]: https://github.com/rq/rq/issues/1197

Signed-off-by: Paul Spooren <mail@aparcar.org>
2020-06-12 12:08:06 +02:00
John Sully
e9aead580d Implement replicaof remove as requested in issue #192
Former-commit-id: 70b80aa5fad6c2191c2142ce49626b81d0950fa8
2020-06-09 12:43:58 -04:00
antirez
51efb7fe25 Redis 6.0.5. 2020-06-09 12:19:30 +02:00
antirez
a7d3670da5 Adapt EVAL+busy script test to new behavior. 2020-06-09 12:19:30 +02:00
antirez
ee8dd01bbc Temporary fix for #7353 issue about EVAL during -BUSY. 2020-06-09 11:53:01 +02:00
xhe
a4a856d532 return the correct proto version
HELLO should return the current proto version, while the code hardcoded
3
2020-06-09 11:53:01 +02:00
Oran Agra
e2046b3003 Don't queue commands in an already aborted MULTI state 2020-06-09 11:53:01 +02:00
Oran Agra
b35fdf1de1 Avoid rejecting WATCH / UNWATCH, like MULTI/EXEC/DISCARD
Much like MULTI/EXEC/DISCARD, the WATCH and UNWATCH are not actually
operating on the database or server state, but instead operate on the
client state. the client may send them all in one long pipeline and check
all the responses only at the end, so failing them may lead to a
mismatch between the client state on the server and the one on the
client end, and execute the wrong commands (ones that were meant to be
discarded)

the watched keys are not actually stored in the client struct, but they
are in fact part of the client state. for instance, they're not cleared
or moved in SWAPDB or FLUSHDB.
2020-06-09 11:53:01 +02:00
zhaozhao.zz
1d7bf208ce AOF: append origin SET if no expire option 2020-06-09 11:53:01 +02:00
Oran Agra
676445ad95 fix disconnectSlaves, to try to free each slave.
the recent change in that loop (iteration rather than waiting for it to
be empty) was intended to avoid an endless loop in case some slave would
refuse to be freed.

but the lookup of the first client remained, which would have caused it
to try the first one again and again instead of moving on.
2020-06-09 11:53:01 +02:00
zhaozhao.zz
4846c0c8af donot free protected client in freeClientsInAsyncFreeQueue
related #7234
2020-06-09 11:53:01 +02:00
John Sully
f3e5c33a75 Update gcov for C++
Former-commit-id: e8d4d095cc5268fb35170dd1f2cb56e25c3d2b69
2020-06-08 16:48:44 -04:00
Ben Schermel
4dec526816 update Dockerfile
Former-commit-id: c50a3568a5b85b5d8c94cb829108ef796bc1327c
2020-06-08 15:34:22 -04:00
Ben Schermel
28b0af66af updating changelog
Former-commit-id: 17e96b91b5743b6f6d3960f531f1f1dfa26180ec
2020-06-08 15:34:22 -04:00
Ben Schermel
4df9480e0b dh9 for stretch deb pkg
Former-commit-id: c5e7a8517b5423ccb2bc16700199f3fc7d285801
2020-06-08 15:34:22 -04:00
Ben Schermel
cfff4e9706 fix missing sentinel
Former-commit-id: c36773777d61e9210d8c05274d26b7819dcb7c23
2020-06-08 15:34:22 -04:00
Ben Schermel
70e6866ad0 update changelog
Former-commit-id: d69e0b8561a50d4d27abdc9b0d0b20e5c9eac004
2020-06-08 15:34:22 -04:00
Ben Schermel
8dd21fbfc4 update changelog
Former-commit-id: 19ccc22a4391708b0eea069b5dc0ea5d9bc22407
2020-06-08 15:34:22 -04:00
Ben Schermel
fecadc0736 update changelog
Former-commit-id: 6968a0cfcb01d244ab9eff55b959a4c42f030182
2020-06-08 15:34:22 -04:00
Ben Schermel
7e25b0fdb7 include support for dists < dh11
Former-commit-id: df618fbd9f4adc0132b51c00480a08d16aca2732
2020-06-08 15:34:22 -04:00
Ben Schermel
d9d5acb70e fix rpmbuild dirs
Former-commit-id: 94acd43340c188e6aff60ee61bfcfcb6675074ab
2020-06-08 15:34:22 -04:00
Ben Schermel
8c8e53bc7d fix rpmbuild dirs
Former-commit-id: 14bdd745d10c5e8efa3518445641629c79407992
2020-06-08 15:34:22 -04:00
Ben Schermel
0a1c677b1a adding dh_installsystemd
Former-commit-id: aa3f5de16fa8f5326baeace48475b026f2d2362f
2020-06-08 15:34:22 -04:00
Ben Schermel
441a5a0d74 strip unused from deb source
Former-commit-id: 9f7890cb1a45f57b549ecccd9962827b6c9ba5be
2020-06-08 15:34:22 -04:00
benschermel
9ba4e2540b add deb/rpm/docker support
Former-commit-id: 1dc34c16b5cee3ed510c2394f4b528f5702234c9
2020-06-08 15:34:22 -04:00
benschermel
5042b550d3 add deb/rpm/docker support
Former-commit-id: b0e7be7ce2c502127a55af4a331601dbac4bafb7
2020-06-08 15:34:22 -04:00
benschermel
0dff417e9a update github CI for deb
Former-commit-id: 026ab4c922972ab9155ff9fcb7ce8b1b2e3a6714
2020-06-08 15:34:22 -04:00
Ben Schermel
1241e36b17 update rpm versioning
Former-commit-id: 07ba64c200176370acad1b4c8be4193e98afa204
2020-06-08 15:34:22 -04:00
benschermel
dbde8a3398 add package utilities
Former-commit-id: b4b35cf904cd690cace4fe3cd1fe8accf118c9a4
2020-06-08 15:34:22 -04:00
John Sully
66e9afe49c Some valgrind fixes
Former-commit-id: ba974c9810dc30b6b5bd21c4bcc6cc5b219f7ea4
2020-06-07 23:20:10 -04:00
John Sully
a41672672b fix valgrind false error
Former-commit-id: 9817db7eddf06becd151e5fef7cc6808777c49cb
2020-06-07 20:17:47 -04:00
John Sully
052a707097 Endurance mode for tests ignore flaky ones
Former-commit-id: 515bb0e6bda8abcab4f8b4cd693084594c734007
2020-06-07 16:59:59 -04:00
John Sully
0a17bbe748 Solo tests should work with loopn
Former-commit-id: bc7ea8fb20c71ace6c35559791e2e8dc6bf4097b
2020-06-07 15:06:50 -04:00
John Sully
c31b96339a Stream tests rely on deferring clients, mitigate races caused by them
Former-commit-id: 2caf8e4c8095215b189942b7eaec3bf5023f7fcf
2020-06-07 13:59:41 -04:00
John Sully
2c560f27b8 replication test race
Former-commit-id: e1f3cd6ec3bf2319484de04c3796dcfa75e0479c
2020-06-07 01:14:57 -04:00
John Sully
b006a06924 fix race in test
Former-commit-id: 02e821530a402796697e63c68e768b563de0a3cb
2020-06-07 00:44:11 -04:00
John Sully
f7a7d16524 Make lazyfree more reliable
Former-commit-id: b6c3d80edbdc4348c071b4108b039f4da5c88ce5
2020-06-07 00:40:58 -04:00
Oran Agra
f33de403ed fix pingoff test race 2020-06-06 11:44:21 +02:00
Kevin Fwu
49af4d07e4 Fix TLS certificate loading for chained certificates.
This impacts client verification for chained certificates (such as Lets
Encrypt certificates). Client Verify requires the full chain in order to
properly verify the certificate.
2020-06-06 11:44:21 +02:00
antirez
329fddbda1 Revert "Implements sendfile for redis."
This reverts commit 9cf500a3f67e4e2ce51414c354e3472faf095d5b.
2020-06-06 11:43:29 +02:00
antirez
925a2cd5aa Revert "avoid using sendfile if tls-replication is enabled"
This reverts commit b9abecfc4c97db01fa6f09180c68a92ea5974ac1.
2020-06-06 11:43:29 +02:00