summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Test: fixed scripting.tcl test false positive.bulkaccept-2.8antirez2014-04-241-0/+1
|
* Process events with processEventsWhileBlocked() when blocked.antirez2014-04-245-4/+27
| | | | | | | | When we are blocked and a few events a processed from time to time, it is smarter to call the event handler a few times in order to handle the accept, read, write, close cycle of a client in a single pass, otherwise there is too much latency added for clients to receive a reply while the server is busy in some way (for example during the DB loading).
* Accept multiple clients per iteration.antirez2014-04-242-17/+33
| | | | | | | | | | | | | | When the listening sockets readable event is fired, we have the chance to accept multiple clients instead of accepting a single one. This makes Redis more responsive when there is a mass-connect event (for example after the server startup), and in workloads where a connect-disconnect pattern is used often, so that multiple clients are waiting to be accepted continuously. As a side effect, this commit makes the LOADING, BUSY, and similar errors much faster to deliver to the client, making Redis more responsive when there is to return errors to inform the clients that the server is blocked in an not interruptible operation.
* While ANET_ERR is -1, check syscall retval for -1 itself.antirez2014-04-241-2/+2
|
* Add test for deleting an expired keyMatt Stancliff2014-04-231-0/+8
| | | | | | | Verify proper expire-before-delete behavior. This test passes with the expire-before-delete commit and fails without it.
* Check key expiration before deletingMatt Stancliff2014-04-231-0/+1
| | | | | | Deleting an expired key should return 0, not success. Fixes #1648
* fix null pointer access with no file pointerGlauber Costa2014-04-231-1/+1
| | | | | | I happen to be working on a system that lacks urandom. While the code does try to handle this case and artificially create some bytes if the file pointer is empty, it does try to close it unconditionally, leading to a segfault.
* Merge pull request #1700 from nirvdrum/patch-1Salvatore Sanfilippo2014-04-231-2/+2
|\ | | | | Fixed typos.
| * Fixed typos.Kevin Menard2014-04-221-2/+2
| |
* | Missing return REDIS_ERR added to processMultibulkBuffer().antirez2014-04-231-1/+3
|/ | | | | | | When we set a protocol error we should return with REDIS_ERR to let the caller know it should stop processing the client. Bug found in a code auditing related to issue #1699.
* redis-cli help.h updated.antirez2014-04-221-2/+73
|
* generate-command-help.rb updated with new hyperloglog group.antirez2014-04-221-1/+2
|
* Redis 2.8.9.2.8.9antirez2014-04-222-1/+11
|
* Fuzzy test for ZREMRANGEBYLEX added.antirez2014-04-181-1/+41
|
* ZREMRANGEBYLEX memory leak removed calling zslFreeLexRange().antirez2014-04-181-2/+5
|
* PFCOUNT multi-key test added.antirez2014-04-181-0/+15
|
* Speedup hllRawSum() processing 8 bytes per iteration.antirez2014-04-181-7/+15
| | | | | | | | | | The internal HLL raw encoding used by PFCOUNT when merging multiple keys is aligned to 8 bits (1 byte per register) so we can exploit this to improve performances by processing multiple bytes per iteration. In benchmarks the new code was several times faster with HLLs with many registers set to zero, while no slowdown was observed with populated HLLs.
* Speedup SUM(2^-reg[m]) in HyperLogLog computation.antirez2014-04-181-4/+8
| | | | | | When the register is set to zero, we need to add 2^-0 to E, which is 1, but it is faster to just add 'ez' at the end, which is the number of registers set to zero, a value we need to compute anyway.
* PFCOUNT support for multi-key union.antirez2014-04-182-6/+73
|
* HyperLogLog low level merge extracted from PFMERGE.antirez2014-04-181-39/+54
|
* ZREMRANGEBYLEX implemented.antirez2014-04-183-0/+77
|
* Always pass sorted set range objects by reference.antirez2014-04-182-45/+47
|
* ZREMRANGE* commands refactored into a single generic function.antirez2014-04-181-65/+58
|
* Sorted set lex ranges stress tester.antirez2014-04-181-0/+65
|
* Basic ZRANGEBYLEX / ZLEXCOUNT tests.antirez2014-04-171-0/+56
|
* Pass by pointer and release of lex ranges.antirez2014-04-171-15/+42
| | | | | | | Given that the code was written with a 2 years pause... something strange happened in the middle. So there was no function to free a lex range min/max objects, and in some places the range was passed by value.
* ZLEXCOUNT implemented.antirez2014-04-163-0/+75
| | | | Like ZCOUNT for lexicographical ranges.
* More HyperLogLog tests.antirez2014-04-161-0/+76
|
* HyperLogLog invalid representation error code set to INVALIDOBJ.antirez2014-04-161-7/+7
|
* PFDEBUG TODENSE added.antirez2014-04-161-0/+15
| | | | Converts HyperLogLogs from sparse to dense. Used for testing.
* User-defined switch point between sparse-dense HLL encodings.antirez2014-04-165-6/+32
|
* PFSELFTEST improved with sparse encoding checks.antirez2014-04-161-4/+29
|
* PFDEBUG ENCODING added.antirez2014-04-161-0/+7
|
* Set HLL_SPARSE_MAX to 3000.antirez2014-04-161-1/+1
| | | | | | | | | | | | | | | After running a few benchmarks, 3000 looks like a reasonable value to keep HLLs with a few thousand elements small while the CPU cost is still not huge. This covers all the cases where the dense representation would use N orders of magnitude more space, like in the case of many HLLs with carinality of a few tens or hundreds. It is not impossible that in the future this gets user configurable, however it is easy to pick an unreasoable value just looking at savings in the space dimension without checking what happens in the time dimension.
* Error message for invalid HLL objects unified.antirez2014-04-161-5/+7
|
* PFMERGE fixed to work with sparse encoding.antirez2014-04-162-10/+47
|
* Mark PFDEBUG as write command in the commands table.antirez2014-04-161-1/+1
| | | | It is safer since it is able to have side effects.
* Correctly replicate PFDEBUG GETREG.antirez2014-04-161-3/+6
| | | | | Even if it is a debugging command, make sure that when it forces a change in encoding, the command is propagated.
* Added assertion in hllSparseAdd() when promotion to dense occurs.antirez2014-04-161-1/+11
| | | | | If we converted to dense, a register must be updated in the dense representation.
* hllSparseAdd(): speed optimization.antirez2014-04-161-12/+15
| | | | | Mostly by reordering opcodes check conditional by frequency of opcodes in larger sparse-encoded HLLs.
* Detect corrupted sparse HLLs in hllSparseSum().antirez2014-04-161-11/+18
|
* hllSparseAdd(): faster code removing conditional.antirez2014-04-161-5/+14
| | | | | Bottleneck found profiling. Big run time improvement found when testing after the change.
* Comment typo in hllSparseAdd(). first -> fits.antirez2014-04-161-1/+1
|
* Merge adjacent VAL opcodes in hllSparseAdd().antirez2014-04-161-5/+36
| | | | | As more values are added splitting ZERO or XZERO opcodes, try to merge adjacent VAL opcodes if they have the same value.
* More robust HLL_SPARSE macros protecting 'p' with parens.antirez2014-04-161-8/+8
| | | | Now the macros will work with arguments such as "ptr+1".
* hllSparseAdd() opcode seek stop condition fixed.antirez2014-04-161-1/+1
|
* Fixed error message generation in PFDEBUG GETREG.antirez2014-04-161-1/+2
| | | | | | Bulk length for registers was emitted too early, so if there was a bug the reply looked like a long array with just one element, blocking the client as result.
* Fixed memmove() count in hllSparseAdd().antirez2014-04-161-1/+1
|
* hllSparseAdd(): more correct dense conversion conditional.antirez2014-04-161-1/+1
| | | | | We want to promote if the total string size exceeds the resulting size after the upgrade.
* hllSparseToDense(): sanity check added.antirez2014-04-161-5/+20
| | | | | | | | | | The function checks if all the HLL_REGISTERS were processed during the convertion from sparse to dense encoding, returning REDIS_OK or REDIS_ERR to signal a corruption problem. A bug in PFDEBUG GETREG was fixed: when the object is converted to the dense representation we need to reassign the new pointer to the header structure pointer.