- 10 Jun, 2020 2 commits
- 21 Apr, 2020 1 commit
-
-
antirez authored
-
- 21 Dec, 2019 1 commit
-
-
bodong.ybd authored
-
- 02 Sep, 2019 1 commit
-
-
antirez authored
-
- 20 Mar, 2019 1 commit
-
-
Oran Agra authored
like in SUNIONSTORE etc, commands that perform writes are expected to open all keys, even input keys, with lookupKeyWrite
-
- 07 Mar, 2019 1 commit
-
-
zhaozhao.zz authored
-
- 18 Feb, 2019 1 commit
-
-
antirez authored
-
- 09 Jan, 2019 2 commits
- 31 Jul, 2018 2 commits
-
-
antirez authored
-
zhaozhao.zz authored
-
- 05 Dec, 2017 2 commits
-
-
zhaozhao.zz authored
-
zhaozhao.zz authored
-
- 12 Sep, 2016 1 commit
-
-
oranagra authored
(Change cherry-picked and modified by @antirez from a larger commit provided by @oranagra in PR #3223).
-
- 20 Jun, 2016 1 commit
-
-
Yossi Gottlieb authored
-
- 09 May, 2016 1 commit
-
-
oranagra authored
-
- 01 Oct, 2015 1 commit
-
-
antirez authored
-
- 27 Jul, 2015 1 commit
-
-
antirez authored
-
- 26 Jul, 2015 5 commits
- 15 May, 2015 1 commit
-
-
antirez authored
-
- 17 Apr, 2015 1 commit
-
-
Glenn Nethercutt authored
uphold the smove contract to return 0 when the element is not a member of the source set, even if source=dest
-
- 31 Mar, 2015 1 commit
-
-
antirez authored
Segfault introduced during a refactoring / warning suppression a few commits away. This particular call assumed that it is safe to pass NULL to the object pointer argument when we are sure the set has a given encoding. This can't be assumed and is now guaranteed to segfault because of the new API of setTypeNext().
-
- 30 Mar, 2015 1 commit
-
-
antirez authored
This change fixes several warnings compiling at -O3 level with GCC 4.8.2, and at the same time, in case of misuse of the API, we have the pointer initialize to NULL or the integer initialized to the value -123456789 which is easy to spot by naked eye.
-
- 11 Feb, 2015 4 commits
-
-
antirez authored
-
antirez authored
The old version of SPOP with "count" argument used an API call of dict.c which was actually designed for a different goal, and was not capable of good distribution. We follow a different three-cases approach optimized for different ratiion between sets and requested number of elements. The implementation is simpler and allowed the removal of a large amount of code.
-
antirez authored
Now the API automatically creates its argv copy and increment ref count of passed objects.
-
antirez authored
Severan problems are addressed but still a few missing. Since replication of this command was more complex than others since it needs to replicate multiple SREM commands, an old API able to do this was reused (it was taken inside the implementation since it was pretty obvious soon or later that would be useful). The API was improved a bit so that now a command may opt-out for the standard command replication when the server.dirty counter is incremented, in order to "manually" replicate what it wants.
-
- 21 Dec, 2014 1 commit
-
-
Alon Diamant authored
1. memory leak in t_set.c has been fixed 2. end-of-line spaces has been removed (from all over the place) 3. for loops have been ordered up to match existing Redis style (less weird) 4. comments format has been fixed (added * in the beggining of every comment line)
-
- 18 Dec, 2014 1 commit
-
-
Alon Diamant authored
Fix: case when SPOP with count>MAXINT, setTypeRandomElements() will get negative count argument due to signed/unsigned mismatch. setTypeRandomElements() now returns unsigned long, and also uses unsigned long for anything related to count of members. spopWithCountCommand() now uses unsigned long elements_returned instead of int, for values returned from setTypeRandomElements()
-
- 14 Dec, 2014 1 commit
-
-
Alon Diamant authored
spopCommand() now runs spopWithCountCommand() in case the <count> param is found. Added intsetRandomMembers() to Intset: Copies N random members from the set into inputted 'values' array. Uses either the Knuth or Floyd sample algos depending on ratio count/size. Added setTypeRandomElements() to SET type: Returns a number of random elements from a non empty set. This is a version of setTypeRandomElement() that is modified in order to return multiple entries, using dictGetRandomKeys() and intsetRandomMembers(). Added tests for SPOP with <count>: unit/type/set, unit/scripting, integration/aof -- Cleaned up code a bit to match with required Redis coding style
-
- 26 Jun, 2014 1 commit
-
-
antirez authored
-
- 13 Dec, 2013 1 commit
-
-
antirez authored
The bug could be easily triggered by: SADD foo a b c 1 2 3 4 5 6 SDIFF foo foo When the key was the same in two sets, an unsafe iterator was used to check existence of elements in the same set we were iterating. Usually this would just result into a wrong output, however with the dict.c API misuse protection we have in place, the result was actually an assertion failed that was triggered by the CI test, while creating random datasets for the "MASTER and SLAVE consistency" test.
-
- 05 Nov, 2013 1 commit
-
-
antirez authored
The previous implementation of SCAN parsed the cursor in the generic function implementing SCAN, SSCAN, HSCAN and ZSCAN. The actual higher-level command implementation only checked for empty keys and return ASAP in that case. The result was that inverting the arguments of, for instance, SSCAN for example and write: SSCAN 0 key Instead of SSCAN key 0 Resulted into no error, since 0 is a non-existing key name very likely. Just the iterator returned no elements at all. In order to fix this issue the code was refactored to extract the function to parse the cursor and return the error. Every higher level command implementation now parses the cursor and later checks if the key exist or not.
-
- 28 Oct, 2013 1 commit
-
-
antirez authored
-
- 22 Jul, 2013 1 commit
-
-
antirez authored
Previously two string encodings were used for string objects: 1) REDIS_ENCODING_RAW: a string object with obj->ptr pointing to an sds stirng. 2) REDIS_ENCODING_INT: a string object where the obj->ptr void pointer is casted to a long. This commit introduces a experimental new encoding called REDIS_ENCODING_EMBSTR that implements an object represented by an sds string that is not modifiable but allocated in the same memory chunk as the robj structure itself. The chunk looks like the following: +--------------+-----------+------------+--------+----+ | robj data... | robj->ptr | sds header | string | \0 | +--------------+-----+-----+------------+--------+----+ | ^ +-----------------------+ The robj->ptr points to the contiguous sds string data, so the object can be manipulated with the same functions used to manipulate plan string objects, however we need just on malloc and one free in order to allocate or release this kind of objects. Moreover it has better cache locality. This new allocation strategy should benefit both the memory usage and the performances. A performance gain between 60 and 70% was observed during micro-benchmarks, however there is more work to do to evaluate the performance impact and the memory usage behavior.
-