antirez
d8f8b0575f
Hash: API to get value string len by field name.
2015-02-27 15:22:49 +01:00
antirez
c95507881a
Utils: added function to get radix 10 string length of signed integer.
2015-02-27 15:22:10 +01:00
antirez
7e6b4ea67b
server.current_client fix and minor refactoring.
...
Thanks to @codeslinger (Toby DiPasquale) for identifying the issue.
Related to issue #2409 .
2015-02-27 14:17:46 +01:00
antirez
832b0c7cce
Improvements to PR #2425
...
1. Remove useless "cs" initialization.
2. Add a "select" var to capture a condition checked multiple times.
3. Avoid duplication of the same if (!copy) conditional.
4. Don't increment dirty if copy is given (no deletion is performed),
otherwise we propagate MIGRATE when not needed.
2015-02-26 10:27:56 +01:00
Tommy Wang
7fda935ad3
Add last_dbid to migrateCachedSocket to avoid redundant SELECT
...
Avoid redundant SELECT calls when continuously migrating keys to
the same dbid within a target Redis instance.
2015-02-26 10:18:43 +01:00
antirez
27c30b0e84
Cast sentlen to int before comparison wit bufpos.
...
This is safe since bufpos is small, inside the range of the local
client buffer.
2015-02-25 10:33:37 +01:00
Salvatore Sanfilippo
9454f7b3db
Merge pull request #2050 from mattsta/bitops-no-overalloc
...
Bitops: Stop overallocating storage space on set
2015-02-25 10:18:07 +01:00
Salvatore Sanfilippo
e00cb78f67
Merge pull request #2054 from mattsta/fix-set-sentinel-quorum
...
Sentinel: Add initial quorum bounds check
2015-02-25 10:09:40 +01:00
Matt Stancliff
47ab570441
Fix types broken by previous type cleanup
...
Revert some size_t back to off_t
Set reply_bytes needs to 64 bits everywhere
Revert bufpos to int since it's a max of 16k into buf[]
2015-02-24 17:39:59 +01:00
Salvatore Sanfilippo
d83c810265
Merge pull request #2301 from mattsta/fix/lengths
...
Improve type correctness
2015-02-24 17:22:53 +01:00
Salvatore Sanfilippo
46bd13b806
Merge pull request #1966 from mattsta/fix-sentinel-info
...
Sentinel: Improve INFO command behavior
2015-02-24 17:20:09 +01:00
Salvatore Sanfilippo
3689a0582b
Merge pull request #2273 from mattsta/improve/consistency/INFO/memory
...
Improve consistency of INFO MEMORY
2015-02-24 17:19:17 +01:00
Salvatore Sanfilippo
5ff00ac8c1
Merge pull request #2401 from mattsta/fix/quicklist/pop
...
Fix quicklist Pop()
2015-02-24 17:13:39 +01:00
antirez
fc365a3a00
Change RENAME behavior when src and dst keys are the same.
...
Fixes issue #2392 .
2015-02-23 11:24:24 +01:00
Jason Roth
db9461e466
added a new hvstrlen command
...
the hvstrlen command returns the length of a hash field value
2015-02-21 15:01:18 +00:00
Matt Stancliff
552e5908bb
Fix quicklist tests for Pop()
...
Now the tests actually compare return values instead of just
verifying _something_ got returned.
2015-02-17 11:33:08 -05:00
John Doe
395e11255c
Fix quicklist Pop() result
...
Closes #2398
2015-02-17 11:31:08 -05:00
antirez
41a1fb8186
Version bumped to 3.1.999 (3.2 alpha versions).
2015-02-14 17:19:17 +01:00
antirez
f638f045ce
redis-cli --latency-dist: one gray more, and --mono support.
2015-02-13 14:38:21 +01:00
antirez
3101d2bffb
redis-cli --latency-dist, hopefully better palette.
...
Less grays: more readable palette since usually we have a non linear
distribution of percentages and very near gray tones are hard to take
apart. Final part of the palette is gradient from yellow to red. The red
part is hardly reached because of usual distribution of latencies, but
shows up mainly when latencies are very high because of the logarithmic
scale, this is coherent to what people expect: red = bad.
2015-02-13 12:52:46 +01:00
antirez
cd4e0f43df
Extend memory unit support in CONFIG SET.
...
Related to PR #2357 .
2015-02-12 16:51:20 +01:00
Salvatore Sanfilippo
866b3fc0ec
Merge pull request #2357 from lamby/config-set-maxmemory-units
...
Support "1G" etc. units in CONFIG SET maxmemory
2015-02-12 16:42:09 +01:00
antirez
29b54db320
Better memtoll() error checking.
...
Related to PR #2357 .
2015-02-12 16:40:46 +01:00
antirez
a37d0f8b48
SPOP with count: fix replication for code path #3 .
2015-02-11 10:52:28 +01:00
antirez
9feee428f2
SPOP: reimplemented for speed and better distribution.
...
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.
2015-02-11 10:52:28 +01:00
antirez
55003f7a11
alsoPropagate: handle REDIS_CALL_PROPAGATE and AOF loading.
2015-02-11 10:52:28 +01:00
antirez
cc7f0434b5
Change alsoPropagate() behavior to make it more usable.
...
Now the API automatically creates its argv copy and increment ref count
of passed objects.
2015-02-11 10:52:27 +01:00
antirez
6b5922dcbb
SPOP with count: initial fixes to the implementation.
...
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.
2015-02-11 10:52:27 +01:00
antirez
585d1a60bf
Separate latency monitoring of eviction loop and eviction DELs.
2015-02-11 10:52:27 +01:00
antirez
8ddc14523f
dict.c: reset emptylen when bucket is not empty.
...
Fixed by @oranagra, thank you.
2015-02-11 10:52:27 +01:00
antirez
05841a6386
redis-cli --stat: show LOAD when loading.
2015-02-11 10:52:27 +01:00
antirez
8696874d75
Remove optional single-key path from evictionPoolPopulate().
2015-02-11 10:52:27 +01:00
antirez
5792a217f8
dict.c: add dictGetSomeKeys(), specialized for eviction.
2015-02-11 10:52:27 +01:00
antirez
f25fdd6246
dict.c: avoid code repetition in dictRehash().
...
Avoid code repetition introduced with PR #2367 , also fixes the return
value to always return 0 if there is nothing more to rehash.
2015-02-11 10:52:27 +01:00
Sun He
2385630d0d
dict.c/dictRehash: check again to update
2015-02-11 10:52:26 +01:00
antirez
4f427bc298
dict.c: don't try buckets that are empty for sure in dictGetRandomKey().
...
This is very similar to the optimization applied to dictGetRandomKeys,
but applied to the single key variant.
Related to issue #2306 .
2015-02-11 10:52:26 +01:00
antirez
1bcf67a75f
dict.c: dictGetRandomKeys() optimization for big->small table case.
...
Related to issue #2306 .
2015-02-11 10:52:26 +01:00
antirez
88cd9ebc09
dict.c: dictGetRandomKeys() visit pattern optimization.
...
We use the invariant that the original table ht[0] is never populated up
to the index before the current rehashing index.
Related to issue #2306 .
2015-02-11 10:52:26 +01:00
antirez
cd0fcf11e7
dict.c: put a bound to max work dictRehash() call can do.
...
Related to issue #2306 .
2015-02-11 10:52:26 +01:00
antirez
777020839a
dict.c: prevent useless resize to same size.
...
Related to issue #2306 .
2015-02-11 10:52:26 +01:00
antirez
170e41464d
Less blocking dictGetRandomKeys().
...
Related to issue #2306 .
2015-02-11 10:52:26 +01:00
antirez
9e9abe29fe
HAVE_SYNC_FILE_RANGE should be protected by ifdef __linux__.
...
Related to issue #2372 .
2015-02-10 09:29:14 +01:00
Salvatore Sanfilippo
50a57c67b2
Merge pull request #2372 from mariano-perez-rodriguez/patch-2
...
Fix HAVE_BACKTRACE on Linux
2015-02-10 09:27:46 +01:00
antirez
bd128f7969
redis-cli --lru-test implemented (cache workload simulator).
2015-02-09 11:06:55 +01:00
antirez
ca23b2a6b7
redis-cli: interactive reconnection for latency modes.
...
--stat mode already used to reconnect automatically if the server is no
longer available. This is useful since this is an interactive mode used
for debugging, however the same applies to --latency and --latency-dist
modes, so now both use the reconnecting command execution as well.
The reconnection code was modified to use basic VT100 escape sequences
in order to play better with different kinds of output on the screen
when the reconnection happens, and to hide the reconnection attempt
output when finally the reconnection happens.
2015-02-08 23:28:27 +01:00
antirez
cfe21852e7
redis-cli --latecy-dist reverted to gray scale.
...
So far not able to find a color palette within the 256 colors which is
not confusing. However I believe it is a possible task, so will try
better later.
2015-02-08 17:39:42 +01:00
antirez
2723412b7b
redis-cli --latency-dist now uses a color palette.
...
Still not happy with the result but low grays are hard to see in certain
monitors with a non perfect gamma.
2015-02-07 20:15:40 +01:00
antirez
ace1acc532
redis-cli latency dist: add new top HL.
2015-02-07 18:06:14 +01:00
Mariano Pérez Rodríguez
c83a739bd8
Fix for #2371
...
Fixing #2371 as per @mattsta's suggestion
2015-02-07 14:02:33 -03:00
antirez
414df143f5
Add missing latency-dest legend symbol.
2015-02-07 15:05:40 +01:00