Commit 4d2e8fa1 authored by antirez's avatar antirez
Browse files

Use getLRUClock() instead of server.lruclock to create objects.

Thanks to Matt Stancliff for noticing this error. It was in the original
code but somehow I managed to remove the change from the commit...
parent 5fa3248b
...@@ -40,7 +40,7 @@ robj *createObject(int type, void *ptr) { ...@@ -40,7 +40,7 @@ robj *createObject(int type, void *ptr) {
o->refcount = 1; o->refcount = 1;
/* Set the LRU to the current lruclock (minutes resolution). */ /* Set the LRU to the current lruclock (minutes resolution). */
o->lru = server.lruclock; o->lru = getLRUClock();
return o; return o;
} }
...@@ -61,7 +61,7 @@ robj *createEmbeddedStringObject(char *ptr, size_t len) { ...@@ -61,7 +61,7 @@ robj *createEmbeddedStringObject(char *ptr, size_t len) {
o->encoding = REDIS_ENCODING_EMBSTR; o->encoding = REDIS_ENCODING_EMBSTR;
o->ptr = sh+1; o->ptr = sh+1;
o->refcount = 1; o->refcount = 1;
o->lru = server.lruclock; o->lru = getLRUClock();
sh->len = len; sh->len = len;
sh->free = 0; sh->free = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment