Skip to content
This repository has been archived by the owner on Nov 2, 2021. It is now read-only.

Commit

Permalink
Merge branch 'github_master' into slab_lru
Browse files Browse the repository at this point in the history
  • Loading branch information
Yao Yue committed Jul 13, 2012
2 parents 3f1086d + b297dc2 commit 060a272
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
7 changes: 5 additions & 2 deletions notes/TODO
@@ -1,7 +1,10 @@
* Add a cmd counter (counter for total # of commands) to stats
* Reply strings like NOT_FOUND, EXISTS, etc should come from a #define table
* Add stat to track the memory overhead of hash table and connection module
* Refactor 'struct setting' to use the preprocessor and a #define table
* Reintroduce the functionality of MEMCACHED_PORT_FILENAME
* Reintroduce the functionality of MEMCACHED_HASH_BULK_MOVE
* Reply strings like NOT_FOUND, EXISTS, etc should come from a #define table
* Move hashing of keys outside the cache_lock; exploring saving hash value in item struct
* Analyze different hashing algorithms, choose the one that is cheapest
* Add stat to track the memory overhead of hash table and connection module
* Put a cap the size of hashtables
* Build a cache warmer or bootstraper, that populates twemcache from a dataset in a file
5 changes: 3 additions & 2 deletions src/mc_ascii.c
Expand Up @@ -735,14 +735,15 @@ asc_process_update(struct conn *c, struct token *token, int ntoken)
}
}

vlen += CRLF_LEN;
if (vlen < 0 || (vlen - CRLF_LEN) < 0) {
if (vlen < 0) {
log_debug(LOG_INFO, "client error on c %d for req of type %d and "
"invalid vlen %d", c->sd, c->req_type, vlen);
asc_write_client_error(c);
return;
}

vlen += CRLF_LEN;

it = item_alloc(key, nkey, flags, time_reltime(exptime), vlen);
if (it == NULL) {
log_debug(LOG_DEBUG, "server error on c %d for req of type %d because "
Expand Down

0 comments on commit 060a272

Please sign in to comment.