Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
bbf39b7a
Commit
bbf39b7a
authored
Mar 06, 2014
by
Salvatore Sanfilippo
Browse files
Merge pull request #1576 from Hailei/fix-lruidletime-comment
Fix REDIS_LRU_CLOCK_MAX's value
parents
b74c899d
138695d9
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/dict.c
View file @
bbf39b7a
...
@@ -239,7 +239,7 @@ int dictExpand(dict *d, unsigned long size)
...
@@ -239,7 +239,7 @@ int dictExpand(dict *d, unsigned long size)
/* Performs N steps of incremental rehashing. Returns 1 if there are still
/* Performs N steps of incremental rehashing. Returns 1 if there are still
* keys to move from the old to the new hash table, otherwise 0 is returned.
* keys to move from the old to the new hash table, otherwise 0 is returned.
* Note that a rehashing step consists in moving a bucket (that may have more
* Note that a rehashing step consists in moving a bucket (that may have more
* than
k
one key as we use chaining) from the old to the new hash table. */
* than one key as we use chaining) from the old to the new hash table. */
int
dictRehash
(
dict
*
d
,
int
n
)
{
int
dictRehash
(
dict
*
d
,
int
n
)
{
if
(
!
dictIsRehashing
(
d
))
return
0
;
if
(
!
dictIsRehashing
(
d
))
return
0
;
...
@@ -695,7 +695,7 @@ static unsigned long rev(unsigned long v) {
...
@@ -695,7 +695,7 @@ static unsigned long rev(unsigned long v) {
* (where SIZE-1 is always the mask that is equivalent to taking the rest
* (where SIZE-1 is always the mask that is equivalent to taking the rest
* of the division between the Hash of the key and SIZE).
* of the division between the Hash of the key and SIZE).
*
*
* For example if the current hash table size is 6
4
, the mask is
* For example if the current hash table size is
1
6, the mask is
* (in binary) 1111. The position of a key in the hash table will be always
* (in binary) 1111. The position of a key in the hash table will be always
* the last four bits of the hash output, and so forth.
* the last four bits of the hash output, and so forth.
*
*
...
...
src/redis.h
View file @
bbf39b7a
...
@@ -382,7 +382,7 @@ typedef long long mstime_t; /* millisecond time type. */
...
@@ -382,7 +382,7 @@ typedef long long mstime_t; /* millisecond time type. */
/* A redis object, that is a type able to hold a string / list / set */
/* A redis object, that is a type able to hold a string / list / set */
/* The actual Redis Object */
/* The actual Redis Object */
#define REDIS_LRU_CLOCK_MAX ((1<<2
1
)-1)
/* Max value of obj->lru */
#define REDIS_LRU_CLOCK_MAX ((1<<2
2
)-1)
/* Max value of obj->lru */
#define REDIS_LRU_CLOCK_RESOLUTION 10
/* LRU clock resolution in seconds */
#define REDIS_LRU_CLOCK_RESOLUTION 10
/* LRU clock resolution in seconds */
typedef
struct
redisObject
{
typedef
struct
redisObject
{
unsigned
type
:
4
;
unsigned
type
:
4
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment